Skip to content
Closed
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: 2 additions & 0 deletions src/routes/pricing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export const Route = createFileRoute('/pricing')({

// Sign in, then come back here and go straight into `target`'s checkout.
function signInThenCheckout(target: PaidPlan) {
// The `target` parameter is already validated by `isPaidPlan` in `validateSearch`
// and is one of the known `PaidPlan` IDs. This ensures it's a controlled value.
const next = `/pricing?checkout=${target}`
window.location.assign(`/auth/sign-in?next=${encodeURIComponent(next)}`)
}
Expand Down
2 changes: 1 addition & 1 deletion src/server/github-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export async function setSignInNext(next: unknown): Promise<void> {
}

setCookie(signInNextCookieName, path, {
maxAge: 60 * 10,
maxAge: 60,
httpOnly: true,
path: '/',
sameSite: 'lax',
Expand Down
Loading