You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+10-9Lines changed: 10 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -66,18 +66,18 @@ Find the assignment for ClientID and replace the value with the Application ID f
66
66
| --- | --- |
67
67
|`clientID`| String representing your Azure Active Directory Application ID |
68
68
|`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`|
75
75
76
76
## Login
77
77
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.
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.
157
157
158
158
## Contributing
159
-
See our contribution guildlines [here](CONTRIBUTING.md)
159
+
160
+
See our contribution guidelines [here](CONTRIBUTING.md)
160
161
161
162
## Resources
162
163
@@ -168,4 +169,4 @@ See our contribution guildlines [here](CONTRIBUTING.md)
168
169
169
170
## Problems or Suggestions
170
171
171
-
[Please create an issue.](/issues)
172
+
[Please create an issue.](https://github.com/Azure-Samples/react-aad-msal/issues)
0 commit comments