From 2c1ff7e78b5898199db26d38ee921f37713a2bf1 Mon Sep 17 00:00:00 2001 From: Mansoor Siddeeq Date: Fri, 13 Dec 2024 07:35:17 -0500 Subject: [PATCH 1/2] microsoft entra config docs --- docs/docs/providers/microsoft-entra-id.md | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/docs/providers/microsoft-entra-id.md diff --git a/docs/docs/providers/microsoft-entra-id.md b/docs/docs/providers/microsoft-entra-id.md new file mode 100644 index 00000000..2adfeaeb --- /dev/null +++ b/docs/docs/providers/microsoft-entra-id.md @@ -0,0 +1,31 @@ +# Microsoft Entra ID + +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. + +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. + +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). + +NOTES: + +- Microsoft Entra ID does not have a `revocationEndpoint`. + +```js +const config = { + serviceConfiguration: { + authorizationEndpoint: 'https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/authorize', + tokenEndpoint: 'https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0/token', + }, + clientId: '', + redirectUrl: 'com.my-app://oauth/redirect', // 'com.my-app' should correspond to your app name + scopes: ['openid', 'profile', 'email', 'offline_access'], +}; + +// Log in to get an authentication token +const authState = await authorize(config); + +// Refresh token +const refreshedState = await refresh(config, { + refreshToken: authState.refreshToken, +}); +``` From 4ef60a399201230af79f72a5d393303cc9a0f53b Mon Sep 17 00:00:00 2001 From: Mansoor Siddeeq Date: Fri, 13 Dec 2024 08:15:02 -0500 Subject: [PATCH 2/2] add notes --- docs/docs/providers/microsoft-entra-id.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/providers/microsoft-entra-id.md b/docs/docs/providers/microsoft-entra-id.md index 2adfeaeb..e675d8ad 100644 --- a/docs/docs/providers/microsoft-entra-id.md +++ b/docs/docs/providers/microsoft-entra-id.md @@ -9,6 +9,8 @@ You can find detailed instructions on registering a new Entra application [here] NOTES: - Microsoft Entra ID does not have a `revocationEndpoint`. +- Application ID can be viewed in your Entra application's dashboard. +- Authorization and Token endpoints can be found under the `Endpoints` link at the top of the page in your Entra application's dashboard. ```js const config = {