-
-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find package 'next-auth' when importing in server using '#auth' #877
Comments
Hi @FabianClemenz 👋 Please ensure you are using You can see more on this in our docs: https://auth.sidebase.io/guide/authjs/quick-start |
Hi @zoey-kaiser i'm not using the AuthJS Provider but the |
The server-side functions are currently only supported by the authjs provider, which is why it prompts you to install the package. The Until it is released, you can fetch the Token manually on the server-side using: Get Token:export default defineEventHandler(() => {
const rawToken = getCookie(event, 'auth.Token') // Or you custom cookie name
const formattedToken = `Bearer ${rawToken}`
}) |
If this works for you! I would close this Issue, feel free to comment in #854 where we previously discussed server-side access for the local provider 🤗 |
@zoey-kaiser ok i c - thanks for clarifying this! i think i can get it working from here - thanks! |
Environment
Reproduction
Reproduction link
Describe the bug
I'm using
nuxt-auth
for JWT authentication with my own backend. I wanted to create a middleware, which adds the accessToken to every request.As seen in the reproduction, i followed exactly the guide here https://auth.sidebase.io/guide/authjs/server-side/jwt-access#jwt-access but i get the error:
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: