mirror of
https://github.com/lobehub/lobehub.git
synced 2026-03-27 13:29:15 +07:00
@@ -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;
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user