File tree Expand file tree Collapse file tree
app/(loggedOutRoutes)/auth Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,10 +16,7 @@ export default async function LoginPage() {
1616 process . env . SSO_FALLBACK_LOCAL !== "false" ;
1717
1818 const hasExistingUsers = await hasUsers ( ) ;
19- if (
20- ( ! hasExistingUsers && ssoEnabled && allowLocal ) ||
21- ( ! hasExistingUsers && ! ssoEnabled )
22- ) {
19+ if ( ! hasExistingUsers && ! ssoEnabled || ! hasExistingUsers && allowLocal ) {
2320 redirect ( "/auth/setup" ) ;
2421 }
2522
Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ import { AuthShell } from "@/app/_components/GlobalComponents/Auth/AuthShell";
66export const dynamic = "force-dynamic" ;
77
88export default async function SetupPage ( ) {
9+ const ssoEnabled = process . env . SSO_MODE === "oidc" ;
910 const allowLocal =
1011 process . env . SSO_FALLBACK_LOCAL &&
1112 process . env . SSO_FALLBACK_LOCAL !== "no" &&
1213 process . env . SSO_FALLBACK_LOCAL !== "false" ;
1314
14- if ( ! allowLocal ) {
15+ if ( ssoEnabled && ! allowLocal ) {
1516 redirect ( "/auth/login" ) ;
1617 }
1718
Original file line number Diff line number Diff line change 11{
22 "name" : " jotty.page" ,
3- "version" : " 1.17.0 " ,
3+ "version" : " 1.17.1 " ,
44 "private" : true ,
55 "scripts" : {
66 "dev" : " next dev" ,
You can’t perform that action at this time.
0 commit comments