Skip to content

Commit

Permalink
Revert: #644
Browse files Browse the repository at this point in the history
  • Loading branch information
zoey-kaiser committed Jan 22, 2024
1 parent 5e87a48 commit 67d33bb
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/runtime/middleware/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ export default defineNuxtRouteMiddleware((to) => {
}

if (authConfig.provider.type === 'authjs') {
// If the middleware runs on a pre-render of the route, do not call signIn, as this is a client method
if (process.server) {
return
}
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>
Expand Down

0 comments on commit 67d33bb

Please sign in to comment.