Skip to content

Commit 7376def

Browse files
authored
Merge pull request #335 from fccview/develop
1.17.1
2 parents b141ce3 + 03e05cc commit 7376def

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

app/(loggedOutRoutes)/auth/login/page.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff 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

app/(loggedOutRoutes)/auth/setup/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ import { AuthShell } from "@/app/_components/GlobalComponents/Auth/AuthShell";
66
export const dynamic = "force-dynamic";
77

88
export 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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jotty.page",
3-
"version": "1.17.0",
3+
"version": "1.17.1",
44
"private": true,
55
"scripts": {
66
"dev": "next dev",

0 commit comments

Comments
 (0)