File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,24 @@ https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-c
1212https://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
1734import Providers from ' next-auth/providers' ;
1835...
@@ -25,4 +42,5 @@ providers: [
2542 }),
2643]
2744...
45+
2846```
You can’t perform that action at this time.
0 commit comments