Skip to content

Commit 0dd8b86

Browse files
liliankasemzmmille2
authored andcommitted
Updating README so that properties are in a table format
1 parent 1b98fa8 commit 0dd8b86

File tree

1 file changed

+11
-31
lines changed

1 file changed

+11
-31
lines changed

README.md

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -65,37 +65,17 @@ Find the assignment for ClientID and replace the value with the Application ID f
6565

6666
## Component Properties
6767

68-
### Required
69-
70-
- `clientID`: String representing your Azure Active Directory Application ID
71-
72-
- `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)
73-
74-
- `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.
75-
76-
- `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
77-
78-
- `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:
79-
80-
```
81-
IUserInfo {
82-
jwtAccessToken: string,
83-
jwtIdToken: string,
84-
user: Msal.User
85-
}
86-
```
87-
88-
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)
89-
90-
- Child Component: You should provide a child component to the AzureAD component, this will be rendered when login is successful
91-
92-
### Optional
93-
94-
- `authority`: 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>`
95-
96-
- `type`: `LoginType.Popup`. Popup is currently the only type available; redirect is currently buggy and disabled.
97-
98-
- `reduxStore`: 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`
68+
| Property | Description |
69+
| --- | --- |
70+
| `clientID` | String representing your Azure Active Directory Application ID |
71+
| `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) |
72+
| `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 |
73+
| `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 |
74+
| `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) |
75+
| `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>` |
76+
| `type` | **[Optional]** `LoginType.Popup`. Popup is currently the only type available; redirect is currently buggy and disabled. |
77+
| `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` |
78+
| Child Component | It is recommended that you provide a child component to the AzureAD component, this will be rendered when login is successful |
9979

10080
## Login
10181
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.

0 commit comments

Comments
 (0)