♻️ refactor: remove azure-ad auth provider (#9942)

remove azure ad
This commit is contained in:
Arvin Xu
2025-10-31 11:19:39 +08:00
committed by GitHub
parent 3a6468ff48
commit 103c4d70fc
2 changed files with 0 additions and 35 deletions

View File

@@ -1,33 +0,0 @@
import AzureAD from 'next-auth/providers/azure-ad';
import { authEnv } from '@/envs/auth';
import { getMicrosoftEntraIdIssuer } from './microsoft-entra-id-helper';
import { CommonProviderConfig } from './sso.config';
const provider = {
id: 'azure-ad',
provider: AzureAD({
...CommonProviderConfig,
// Specify auth scope, at least include 'openid email'
// all scopes in Azure AD ref: https://learn.microsoft.com/en-us/entra/identity-platform/scopes-oidc#openid-connect-scopes
authorization: { params: { scope: 'openid email profile' } },
// TODO(NextAuth ENVs Migration): Remove once nextauth envs migration time end
clientId: authEnv.AZURE_AD_CLIENT_ID ?? process.env.AUTH_AZURE_AD_ID,
clientSecret: authEnv.AZURE_AD_CLIENT_SECRET ?? process.env.AUTH_AZURE_AD_SECRET,
issuer: getMicrosoftEntraIdIssuer(),
// Remove end
// TODO(NextAuth): map unique user id to `providerAccountId` field
// profile(profile) {
// return {
// email: profile.email,
// image: profile.picture,
// name: profile.name,
// providerAccountId: profile.user_id,
// id: profile.user_id,
// };
// },
}),
};
export default provider;

View File

@@ -1,7 +1,6 @@
import Auth0 from './auth0';
import Authelia from './authelia';
import Authentik from './authentik';
import AzureAD from './azure-ad';
import Casdoor from './casdoor';
import CloudflareZeroTrust from './cloudflare-zero-trust';
import Cognito from './cognito';
@@ -19,7 +18,6 @@ import Zitadel from './zitadel';
export const ssoProviders = [
Auth0,
Authentik,
AzureAD,
GenericOIDC,
Github,
Zitadel,