You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observe that console logs error Authentication failed, since session is null
async function handler(request: NextRequest) {
const session = await auth()
if (!session) {
console.error("Authentication failed");
}
...
}
Expected behavior
session should not be null and console should not log the error message.
The text was updated successfully, but these errors were encountered:
JihongGan
added
bug
Something isn't working
triage
Unseen or unconfirmed by a maintainer yet. Provide extra information in the meantime.
labels
Aug 30, 2024
Environment
Reproduction URL
https://github.com/JihongGan/next-auth-example
Describe the issue
In the example app's catch-all handler app/[...proxy]/route.tsx,
auth()
returnsnull
even when a user is signed in via Google.How to reproduce
Authentication failed
, sincesession
isnull
Expected behavior
session
should not benull
and console should not log the error message.The text was updated successfully, but these errors were encountered: