Skip to content

Commit

Permalink
docs(provider): Update azure-ad-b2c.md [skip release] (#1280)
Browse files Browse the repository at this point in the history
* 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 <me@iaincollins.com>
  • Loading branch information
rhufsky and iaincollins authored Feb 8, 2021
1 parent 8121f72 commit cfc6648
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions www/docs/providers/azure-ad-b2c.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,24 @@ https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-c
https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-tenant

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

In `.env.local` create the follwing entries:

```
AZURE_CLIENT_ID=<copy Application (client) ID here>
AZURE_CLIENT_SECRET=<copy generated secret value here>
AZURE_TENANT_NAME=<copy the name of the tenant here>
AZURE_TENANT_ID=<copy the tenant id here>
```

In `pages/api/auth/[...nextauth].js` find or add the AZURE entries:

```js
import Providers from 'next-auth/providers';
...
Expand All @@ -25,4 +42,5 @@ providers: [
}),
]
...

```

0 comments on commit cfc6648

Please sign in to comment.