Skip to content

Commit f4e169d

Browse files
authored
Merge pull request #36 from Azure-Samples/update-readme
Updating README.md
2 parents 368e035 + 38372d4 commit f4e169d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,18 +66,18 @@ Find the assignment for ClientID and replace the value with the Application ID f
6666
| --- | --- |
6767
| `clientID` | String representing your Azure Active Directory Application ID |
6868
| `scopes` | Array of permission scopes you want to request from the application you are authenticating against. You can see possible [values for this property here](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-v2-scopes) |
69-
| `authenticatedFunction` | A user defined callback function for the AzureAD component to consume. This function receives the AzureAD components logout function, and returns JSX containing the logged in portion of your app. You can use this received logout callback to attach it to any part of your logged in portion of your application |
70-
| `unauthenticatedFunction` | A user defined callback function for the AzureAD component to consume. This function receives the AzureAD components login function which you can then use to trigger a login as you like |
71-
| `userInfoCallback` | A user defined callback function. The AzureAD library will calls this function when login is complete to pass back the user info in the following format: <br /><br /> ``` UserInfo { jwtAccessToken: string, jwtIdToken: string, user: Msal.User }``` <br /> <br /> The format of `Msal.User` [can be found here](https://htmlpreview.github.io/?https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-for-js/dev/docs/classes/_user_.user.html) |
72-
| `authority` | **[Optional]** A string representing your Azure Active Directory application policy. Include if you are trying to authenticate against your Azure Active Directory application. If you're using a B2C AAD, it is usually in the format of: `https://login.microsoftonline.com/tfp/<your-tenant-name>.onmicrosoft.com/<your-sign-in-sign-up-policy>` |
73-
| `type` | **[Optional]** `LoginType.Popup`. Popup is currently the only type available; redirect is currently buggy and disabled. |
74-
| `reduxStore` | **[Optional]** If you want to use redux for auth, you can provide a redux store which the AzureAD component will dispatch a `AAD_LOGIN_SUCCESS` action, as well as a `payload` containing `IUserInfo` |
69+
| `authenticatedFunction` | A user defined callback function for the AzureAD component to consume. This function receives the AzureAD components `logout function` which you can use to trigger a logout |
70+
| `unauthenticatedFunction` | A user defined callback function for the AzureAD component to consume. This function receives the AzureAD components `login function` which you can then use to trigger a login |
71+
| `userInfoCallback` | A user defined callback function for the AzureAD component to consume. The AzureAD component will call this function when login is complete to pass back the user info in the following format: <br /><br /> ``` UserInfo { jwtAccessToken: string, jwtIdToken: string, user: Msal.User }``` <br /> <br /> The format of `Msal.User` [can be found here](https://htmlpreview.github.io/?https://raw.githubusercontent.com/AzureAD/microsoft-authentication-library-for-js/dev/docs/classes/_user_.user.html) |
72+
| `authority` | **[Optional]** A string representing your Azure Active Directory application policy. Include if you are trying to authenticate against your Azure Active Directory application. If you're using a B2C AAD, it is usually in the format of: <br/> <br/> `https://login.microsoftonline.com/tfp/<your-tenant-name>.onmicrosoft.com/<your-sign-in-sign-up-policy>` |
73+
| `type` | **[Optional]** `LoginType.Popup` or `LoginType.Redirect`. Redirect is the default if this value is not provided. Make sure to import `LoginType` from the react-aad-msal npm module if using this property |
74+
| `reduxStore` | **[Optional]** You can provide a redux store which the AzureAD component will dispatch `AAD_LOGIN_SUCCESS` and `AAD_LOGIN_SUCCESS` actions, as well as a `payload` containing `IUserInfo` |
7575

7676
## Login
7777
To login, first create a callback function for the AzureAD component to consume. This function will be called when the component loads, and it will pass in the function to be called when the user wants to login. In this case, we create a button that will log the user in.
7878

7979
``` jsx
80-
import AzureAD from 'AzureAD'
80+
import { AzureAD, LoginType } from 'AzureAD'
8181

8282
loginCallback = (login) => {
8383
return <button onclick={login}>Login</button>;
@@ -156,7 +156,8 @@ const sampleReducer = (state = initialState, action) => {
156156
A sample React-based Single Page Application (SPA) that uses this component is available in the [sample folder](sample/README.md). There you'll find a couple implementations that leverage the library, as well as a tutorial of how to set up Azure Active Directory with an Identity Provider.
157157
158158
## Contributing
159-
See our contribution guildlines [here](CONTRIBUTING.md)
159+
160+
See our contribution guidelines [here](CONTRIBUTING.md)
160161
161162
## Resources
162163
@@ -168,4 +169,4 @@ See our contribution guildlines [here](CONTRIBUTING.md)
168169
169170
## Problems or Suggestions
170171
171-
[Please create an issue.](/issues)
172+
[Please create an issue.](https://github.com/Azure-Samples/react-aad-msal/issues)

0 commit comments

Comments
 (0)