From 7bedd4afa9d2126841be8d8e98be8eb965ebc3ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20Orb=C3=A1n?= Date: Sun, 6 Dec 2020 21:43:13 +0100 Subject: [PATCH] Revert "feat(provider): Add Azure Active Directory B2C (#809)" (#919) This reverts commit 6e6a24a7af9b14847fdfcd91345a5d833f36a228. --- src/providers/azure-ad-b2c.js | 24 ------------------------ src/providers/index.js | 2 -- www/docs/configuration/providers.md | 1 - www/docs/faq.md | 2 +- www/docs/providers/azure-ad-b2c.md | 28 ---------------------------- www/sidebars.js | 1 - 6 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 src/providers/azure-ad-b2c.js delete mode 100644 www/docs/providers/azure-ad-b2c.md diff --git a/src/providers/azure-ad-b2c.js b/src/providers/azure-ad-b2c.js deleted file mode 100644 index fbf8dc40b6..0000000000 --- a/src/providers/azure-ad-b2c.js +++ /dev/null @@ -1,24 +0,0 @@ -export default (options) => { - const tenant = options.tenantId ? options.tenantId : 'common' - - return { - id: 'azure-ad-b2c', - name: 'Azure Active Directory B2C', - type: 'oauth', - version: '2.0', - params: { - grant_type: 'authorization_code' - }, - accessTokenUrl: `https://login.microsoftonline.com/${tenant}/oauth2/v2.0/token`, - authorizationUrl: `https://login.microsoftonline.com/${tenant}/oauth2/v2.0/authorize?response_type=code&response_mode=query`, - profileUrl: 'https://graph.microsoft.com/v1.0/me/', - profile: (profile) => { - return { - id: profile.id, - name: profile.displayName, - email: profile.userPrincipalName - } - }, - ...options - } -} diff --git a/src/providers/index.js b/src/providers/index.js index 27eb6d8d0b..62f4f229e3 100644 --- a/src/providers/index.js +++ b/src/providers/index.js @@ -1,7 +1,6 @@ import Apple from './apple' import Atlassian from './atlassian' import Auth0 from './auth0' -import AzureADB2C from './azure-ad-b2c' import Basecamp from './basecamp' import BattleNet from './battlenet' import Box from './box' @@ -28,7 +27,6 @@ export default { Atlassian, Auth0, Apple, - AzureADB2C, Basecamp, BattleNet, Box, diff --git a/www/docs/configuration/providers.md b/www/docs/configuration/providers.md index d95d185221..1459c80c1c 100644 --- a/www/docs/configuration/providers.md +++ b/www/docs/configuration/providers.md @@ -14,7 +14,6 @@ NextAuth.js is designed to work with any OAuth service, it supports OAuth 1.0, 1 * [Apple](/providers/apple) * [Atlassian](/providers/atlassian) * [Auth0](/providers/auth0) -* [Azure Active Directory B2C](/providers/azure-ad-b2c) * [Basecamp](/providers/basecamp) * [Battle.net](/providers/battlenet) * [Box](/providers/box) diff --git a/www/docs/faq.md b/www/docs/faq.md index 973b462a0f..3a4053558b 100644 --- a/www/docs/faq.md +++ b/www/docs/faq.md @@ -23,7 +23,7 @@ You can use also NextAuth.js with any database using a custom database adapter, ### What authentication services does NextAuth.js support? -NextAuth.js includes built-in support for signing in with Apple, Atlassian, Auth0, Azure Active Directory B2C, Google, Battle.net, Box, AWS Cognito, Discord, Facebook, FusionAuth, GitHub, GitLab, Google, Open ID Identity Server, Mixer, Okta, Slack, Spotify, Twitch, Twitter and Yandex. +NextAuth.js includes built-in support for signing in with Apple, Atlassian, Auth0, Google, Battle.net, Box, AWS Cognito, Discord, Facebook, FusionAuth, GitHub, GitLab, Google, Open ID Identity Server, Mixer, Okta, Slack, Spotify, Twitch, Twitter and Yandex. NextAuth.js also supports email for passwordless sign in, which is useful for account recovery or for people who are not able to use an account with the configured OAuth services (e.g. due to service outage, account suspension or otherwise becoming locked out of an account). diff --git a/www/docs/providers/azure-ad-b2c.md b/www/docs/providers/azure-ad-b2c.md deleted file mode 100644 index a855e9d53d..0000000000 --- a/www/docs/providers/azure-ad-b2c.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -id: azure-ad-b2c -title: Azure Active Directory B2C ---- - -## Documentation - -https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-auth-code-flow - -## Configuration - -https://docs.microsoft.com/en-us/azure/active-directory-b2c/tutorial-create-tenant - -## Example - -```js -import Providers from 'next-auth/providers'; -... -providers: [ - Providers.AzureADB2C({ - clientId: process.env.AZURE_CLIENT_ID, - clientSecret: process.env.AZURE_CLIENT_SECRET, - scope: 'offline_access User.Read', - tenantId: process.env.AZURE_TENANT_ID, - }), -] -... -``` diff --git a/www/sidebars.js b/www/sidebars.js index b7f504c308..706e30e42e 100644 --- a/www/sidebars.js +++ b/www/sidebars.js @@ -26,7 +26,6 @@ module.exports = { 'providers/apple', 'providers/atlassian', 'providers/auth0', - 'providers/azure-ad-b2c', 'providers/basecamp', 'providers/battle.net', 'providers/box',