We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e87a48 commit 67d33bbCopy full SHA for 67d33bb
src/runtime/middleware/auth.ts
@@ -85,10 +85,6 @@ export default defineNuxtRouteMiddleware((to) => {
85
}
86
87
if (authConfig.provider.type === 'authjs') {
88
- // If the middleware runs on a pre-render of the route, do not call signIn, as this is a client method
89
- if (process.server) {
90
- return
91
- }
92
const signInOptions: Parameters<typeof signIn>[1] = { error: 'SessionRequired', callbackUrl: determineCallbackUrl(authConfig, () => to.fullPath) }
93
// @ts-ignore This is valid for a backend-type of `authjs`, where sign-in accepts a provider as a first argument
94
return signIn(undefined, signInOptions) as ReturnType<typeof navigateToAuthPages>
0 commit comments