Skip to content

Commit dfce4fd

Browse files
committed
Correcting doc language errors
1 parent 571bdaf commit dfce4fd

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ src/**/*.js
2020
src/**/*.js.map
2121
src/**/*.d.ts
2222

23-
samples/**/*/secrets.ts
24-
samples/**/*/secrets.js
23+
samples/**/secrets.ts
24+
samples/**/secrets.js
2525
samples/node/secrets.json
2626
samples/browser/src/secrets.js
2727
samples/browser/src/graph-js-sdk.js

docs/ImplicitMSALAuthenticationProvider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Refer devDependencies in [package.json](../package.json) for the compatible msal version and update that version in below.
44

5-
**Important Note:** MSAL is supported only for frontend applications, for server-side authentication you have to can use [TokenCredentialAuthenticationProvider](./TokenCredentialAuthenticationProvider.md) or implement your own AuthenticationProvider. Learn how you can create a [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).
5+
**Important Note:** MSAL is supported only for frontend applications, for server-side authentication you either can use [TokenCredentialAuthenticationProvider](./TokenCredentialAuthenticationProvider.md) or implement your own AuthenticationProvider. Learn how you can create a [Custom Authentication Provider](./docs/CustomAuthenticationProvider.md).
66

77
```html
88
<script src="https://secure.aadcdn.microsoftonline-p.com/lib/<version>/js/msal.min.js"></script>

docs/TokenCredentialAuthenticationProvider.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,22 @@
88

99
- Check the [tokenCredentialSamples folder][../samples/tokencredentialsamples]. The ClientSecretCredentialFlow is an example of using TokenCredential to authenticate a node application. The AuthenticationCodeFlow is an example of using TokenCredential to authenticate a browser application.
1010

11-
**Important Note:** TokenCredentials can be used to authentication browser and node applications.
11+
**Important Note:** TokenCredentials can be used to authenticate browser and node applications.
1212

13-
###### Example of how to create and pass a token credential sample -
13+
###### Example of how to create and pass a token credential -
1414

1515
```typescript
16-
// Import the TokenCredential class that you wish to use. This examples uses a Client SecretCredential
16+
// Import the TokenCredential class that you wish to use. This example uses a Client SecretCredential
1717

1818
import { ClientSecretCredential } from "@azure/identity";
1919
import { TokenCredentialAuthenticationProvider, TokenCredentialAuthenticationProviderOptions } from "@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials";
2020

21-
// Create an instance of the TokenCredential Class that is imported
21+
// Create an instance of the TokenCredential class that is imported
2222
const tokenCredential = new ClientSecretCredential("your_tenantId", "your_clientId", "your_clientSecret");
2323

2424
// Set your scopes and options for TokenCredential.getToken (Check the ` interface GetTokenOptions` in (TokenCredential Implementation)[https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/core/core-auth/src/tokenCredential.ts])
2525

26-
const options: TokenCredentialAuthenticationProviderOptions = { scopes: [scopes], getTokenoptions };
26+
const options: TokenCredentialAuthenticationProviderOptions = { scopes: [scopes], getTokenOtions };
2727

2828
// Create an instance of the TokenCredentialAuthenticationProvider by passing the tokenCredential instance and options to the constructor
2929
const authProvider = new TokenCredentialAuthenticationProvider(tokenCredential, options);
@@ -35,7 +35,7 @@ const res = await client.api("/users/").get();
3535
```
3636

3737
```javascript
38-
// Import the TokenCredential class that you wish to use. This examples uses a Client SecretCredential
38+
// Import the TokenCredential class that you wish to use. This examples uses a ClientSecretCredential
3939

4040
const { ClientSecretCredential } = require("@azure/identity");
4141
const { Client } = require("@microsoft/microsoft-graph-client");

samples/tokenCredentialSamples/AuthenticationCodeFlow/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@
1919

2020
4. Navigate to authenticationCodeFlow samples directory [./samples/tokenCredentialSamples/authenticationCodeFlow]
2121

22-
5.Run `npm start` to build and start the application.
22+
5. Run `npm start` to build and start the application.

samples/tokenCredentialSamples/AuthenticationCodeFlow/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ async function getCredential(): Promise<AuthorizationCodeCredential> {
6464
// Direct the user to the authentication URI either by opening a
6565
// browser (desktop and mobile apps) or redirecting their browser
6666
// using a Location header (web apps and APIs).
67-
const authenticateUrl = getAuthorizeUrl(tenantId!, clientId!, scopes);
68-
console.log("Opening user's browser to URL:", authenticateUrl);
69-
await open(authenticateUrl);
67+
const authorizeUrl = getAuthorizeUrl(tenantId!, clientId!, scopes);
68+
console.log("Opening user's browser to URL:", authorizeUrl);
69+
await open(authorizeUrl);
7070

7171
// Wait for the authorization response to be send to the redirect URI
7272
const authorizationCode = await authCodePromise;
7373
console.log("\nReceived authorization code:", authorizationCode);
7474

7575
// Once we have the authorization code, the AuthorizationCodeCredential
76-
// can be created. This credential will take care of requesting and
76+
// can be created. This credential will take care of requesting and
7777
// refreshing the access token from this point forward.
7878
if (clientSecret) {
7979
return new AuthorizationCodeCredential(
@@ -84,7 +84,7 @@ async function getCredential(): Promise<AuthorizationCodeCredential> {
8484
redirectUri,
8585
// NOTE: It is not necessary to explicitly pass the authorityHost when using
8686
// the default authority host: https://login.microsoftonline.com. It is only
87-
// necesary when a different authority host is used in the initial authorization
87+
// necessary when a different authority host is used in the initial authorization
8888
// URI.
8989
{ authorityHost },
9090
);

samples/tokenCredentialSamples/ClientCredentialFlow/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
- [Register an application](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-register-app)
66

7-
- [documention](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis#add-credentials-to-your-web-application).
7+
- [Documention](https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-access-web-apis#add-credentials-to-your-web-application).
88

99
2. Rename [secrets.sample.ts](./typescript/secrets.sample.ts) to secrets.ts or rename [secrets.sample.js](./javascript/secrets.sample.js) to secrets.js
1010

11-
3. Update your clientId, tenantId, scopes, clientSecret in the **secrets.ts/secrets.js)** file.
11+
3. Update your clientId, tenantId, scopes, clientSecret in the **secrets.ts/secrets.js** file.
1212

1313
## Run Sample
1414

0 commit comments

Comments
 (0)