Skip to content

Commit cfc6648

Browse files
rhufskyiaincollins
andauthored
docs(provider): Update azure-ad-b2c.md [skip release] (#1280)
* docs(adapter): Update Prisma docs (#1279) * Update azure-ad-b2c.md add hint for redirection URL, otherwise difficult to find out * Update azure-ad-b2c.md changed .env ro .env.local as per recommendation * Update azure-ad-b2c.md * Update azure-ad-b2c.md * Update azure-ad-b2c.md * update conf in .env.local follow the .env guidelines * Update azure-ad-b2c.md * Create azure-ad-b2c.md * Create azure-ad-b2c.md * Update azure-ad-b2c.md Co-authored-by: Iain Collins <[email protected]>
1 parent 8121f72 commit cfc6648

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

www/docs/providers/azure-ad-b2c.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,24 @@ https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-c
1212
https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-tenant
1313

1414
## Example
15+
- In https://portal.azure.com/ -> Azure Active Directory create a new App Registration.
16+
- Make sure to remember / copy
17+
- Application (client) ID
18+
- Directory (tenant) ID
19+
- When asked for a redirection URL, use http://localhost:3000/api/auth/callback/azure-ad-b2c
20+
- Create a new secret and remember / copy its value immediately, it will disappear.
1521

22+
In `.env.local` create the follwing entries:
23+
24+
```
25+
AZURE_CLIENT_ID=<copy Application (client) ID here>
26+
AZURE_CLIENT_SECRET=<copy generated secret value here>
27+
AZURE_TENANT_NAME=<copy the name of the tenant here>
28+
AZURE_TENANT_ID=<copy the tenant id here>
29+
```
30+
31+
In `pages/api/auth/[...nextauth].js` find or add the AZURE entries:
32+
1633
```js
1734
import Providers from 'next-auth/providers';
1835
...
@@ -25,4 +42,5 @@ providers: [
2542
}),
2643
]
2744
...
45+
2846
```

0 commit comments

Comments
 (0)