Skip to content

Commit 76edeac

Browse files
committed
merge from master
2 parents df1f666 + f4e169d commit 76edeac

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ deploy:
1414
on:
1515
tags: false
1616
node: 8
17-
repo: Azure-Samples/react-aad-msal"
17+
repo: Azure-Samples/react-aad-msal
1818
# - provider: npm
1919
2020
# api_key:

.travis/pu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ check_release() {
4646
echo "script will continue..."
4747
else
4848
echo "this is NOT a PR"
49-
exit(0)
49+
exit 0
5050
fi
5151
}
5252

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)