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
I created a /server/api/ set of endpoints for connecting and disconnecting existing social accounts. I placed these files in a directory named /server/api/auth-connect. In these files, the getServerSession returns undefined since the api route (/api/auth-connect/) starts with the string /api/auth.
Same here ...
2 days, I'm raging against the version trying to find something ! And here is @chriscdn finding the exact same problem !
In my case I changed the base url to baseURL: '/api/admin/auth' and got same problem.
The try catch gave me this information:
statusCode: 500, fatal: false, unhandled: false, statusMessage: 'Tried to get server session without setting up an endpoint to handle authentication (see https://github.com/sidebase/nuxt-auth#quick-start)', data: undefined }
Closed due to an old version. If anyone is still experiencing this issue, please check if it still exists in 0.8.0 and that the module has been setup using the new docs: https://auth.sidebase.io
Environment
Reproduction
No response
Describe the bug
I created a
/server/api/
set of endpoints for connecting and disconnecting existing social accounts. I placed these files in a directory named/server/api/auth-connect
. In these files, thegetServerSession
returnsundefined
since the api route (/api/auth-connect/
) starts with the string/api/auth
.I traced the problem to the getServerSession method:
In my instance,
authBasePath
resolves to/api/auth
. Sinceevent.path
resolves to/api/auth-connect/
, the check passes and therefore returns null.I can't comment on why this check is necessary, but doubt all routes that start with
auth
should be excluded from using this method.Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: