Skip to content

Commit 2c1ff7e

Browse files
committed
microsoft entra config docs
1 parent 3530c7d commit 2c1ff7e

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Microsoft Entra ID
2+
3+
If you're using Microsoft Identity platform and want to add App Auth to your React Native application, you'll need an Entra application to authorize against.
4+
5+
Microsoft offers mupltiple different PLatform configurations you could setup for your application. In this example, we are using the `Mobile and desktop applications` platform configuration.
6+
7+
You can find detailed instructions on registering a new Entra application [here](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app?tabs=certificate).
8+
9+
NOTES:
10+
11+
- Microsoft Entra ID does not have a `revocationEndpoint`.
12+
13+
```js
14+
const config = {
15+
serviceConfiguration: {
16+
authorizationEndpoint: 'https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/authorize',
17+
tokenEndpoint: 'https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token',
18+
},
19+
clientId: '<APPLICATION_ID>',
20+
redirectUrl: 'com.my-app://oauth/redirect', // 'com.my-app' should correspond to your app name
21+
scopes: ['openid', 'profile', 'email', 'offline_access'],
22+
};
23+
24+
// Log in to get an authentication token
25+
const authState = await authorize(config);
26+
27+
// Refresh token
28+
const refreshedState = await refresh(config, {
29+
refreshToken: authState.refreshToken,
30+
});
31+
```

0 commit comments

Comments
 (0)