fix: disable sso login when no issuer present
This commit is contained in:
parent
43504d31f7
commit
bf50f3a5a5
2 changed files with 9 additions and 2 deletions
|
@ -2,7 +2,9 @@ import NextAuth from 'next-auth';
|
|||
import Authentik from 'next-auth/providers/authentik';
|
||||
|
||||
export const { handlers, signIn, signOut, auth } = NextAuth({
|
||||
providers: [Authentik],
|
||||
providers: [process.env.AUTH_AUTHENTIK_ISSUER ? Authentik : null].filter(
|
||||
(x) => x !== null,
|
||||
),
|
||||
callbacks: {
|
||||
authorized: async ({ auth }) => {
|
||||
return !!auth;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue