Skip to content

Remove gates #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const Login: NextPage = () => {
return
}
if (MiscInfo.isManaged) {
router.push("/welcome")
router.push("/cognition")
} else {
router.push("/refinery/projects")
}
Expand Down
2 changes: 1 addition & 1 deletion pages/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ const Settings: NextPage = () => {
</div>) : (<> </>)}

<div className="link-container">
<a className="link" data-testid="forgot-password" href="/welcome">Back</a>
<a className="link" data-testid="forgot-password" href="/cognition">Back</a>
</div>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions pkg/errors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function handleGetFlowError<S>(
return
case "session_already_available":
// User is already signed in, let's redirect them home!
await router.push("/welcome")
await router.push("/cognition")
return
case "session_refresh_required":
// We need to re-authenticate to perform this action
Expand All @@ -27,13 +27,13 @@ export function handleGetFlowError<S>(
// The flow expired, let's request a new one.
toast.error("The return_to address is not allowed.")
resetFlow(undefined)
await router.push("/welcome" + flowType)
await router.push("/cognition" + flowType)
return
case "self_service_flow_expired":
// The flow expired, let's request a new one.
toast.error("Your interaction expired, please fill out the form again.")
resetFlow(undefined)
await router.push("/welcome" + flowType)
await router.push("/cognition" + flowType)
return
case "security_csrf_violation":
// A CSRF violation occurred. Best to just refresh the flow!
Expand All @@ -46,7 +46,7 @@ export function handleGetFlowError<S>(
case "security_identity_mismatch":
// The requested item was intended for someone else. Let's request a new flow...
resetFlow(undefined)
await router.push("/welcome" + flowType)
await router.push("/cognition" + flowType)
return
case "browser_location_change_required":
// Ory Kratos asked us to point the user to this URL.
Expand All @@ -58,7 +58,7 @@ export function handleGetFlowError<S>(
case 410:
// The flow expired, let's request a new one.
resetFlow(undefined)
await router.push("/welcome" + flowType)
await router.push("/cognition" + flowType)
return
}

Expand Down
2 changes: 1 addition & 1 deletion submodules/javascript-functions
Loading