Skip to content
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

docs: improve Auth.js integration page #7302

Merged
merged 1 commit into from
Feb 1, 2025
Merged
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
4 changes: 2 additions & 2 deletions packages/docs/src/routes/docs/integrations/authjs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ When migrating from `@builder.io/qwik-auth` to `@auth/qwik`, there are a couple
const session: Session | null = event.sharedMap.get('session');
if (!session || new Date(session.expires) < new Date()) {
- throw event.redirect(302, `/api/auth/signin?redirectTo=${event.url.pathname}`);
+ throw event.redirect(302, `/auth/signin?redirectTo=${event.url.pathname}`);
+ throw event.redirect(302, `/auth/signin?callbackUrl=${event.url.pathname}`);
}
};
```
Expand Down Expand Up @@ -353,7 +353,7 @@ Session data can be accessed via the route `event.sharedMap`. So a route can be
export const onRequest: RequestHandler = (event) => {
const session: Session | null = event.sharedMap.get('session');
if (!session || new Date(session.expires) < new Date()) {
throw event.redirect(302, `/auth/signin?redirectTo=${event.url.pathname}`);
throw event.redirect(302, `/auth/signin?callbackUrl=${event.url.pathname}`);
}
};
```
Expand Down