Skip to content

Commit

Permalink
fix: include hash & query parameters in callbackUrl (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdallahAlhaddad authored Jan 22, 2024
1 parent cf32ea7 commit 59a17f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/middleware/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default defineNuxtRouteMiddleware((to) => {
if (process.server) {
return
}
const signInOptions: Parameters<typeof signIn>[1] = { error: 'SessionRequired', callbackUrl: determineCallbackUrl(authConfig, () => to.path) }
const signInOptions: Parameters<typeof signIn>[1] = { error: 'SessionRequired', callbackUrl: determineCallbackUrl(authConfig, () => to.fullPath) }
// @ts-ignore This is valid for a backend-type of `authjs`, where sign-in accepts a provider as a first argument
return signIn(undefined, signInOptions) as ReturnType<typeof navigateToAuthPages>
} else if (typeof metaAuth === 'object' && metaAuth.navigateUnauthenticatedTo) {
Expand Down

0 comments on commit 59a17f5

Please sign in to comment.