Skip to content

Commit

Permalink
fix: #5227 (#6156)
Browse files Browse the repository at this point in the history
* fix for #5227

* style(qwik-auth): fmt

---------

Co-authored-by: Evgenii Fedotov (evfedoto) <evfedoto@cisco.com>
Co-authored-by: PatrickJS <github@patrickjs.com>
  • Loading branch information
3 people committed May 1, 2024
1 parent f62c103 commit 8a91362
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/qwik-auth/src/index.ts
Expand Up @@ -51,6 +51,11 @@ export function serverAuthQrl(authOptions: QRL<(ev: RequestEventCommon) => QwikA

const data = await authAction(body, req, signInUrl, auth);

// set authjs.callback-url cookie. Fix for https://github.com/QwikDev/qwik/issues/5227
req.cookie.set('authjs.callback-url', callbackUrl, {
path: '/',
});

if (data.url) {
throw req.redirect(301, data.url);
}
Expand Down

0 comments on commit 8a91362

Please sign in to comment.