No session created - nuxt auth utils
No cookies, and no session is set after a successful auth. Even logging the session directly afterwards shows good data and it was set. But nada.
27 Replies
I also get weird behavior with the data returned, it includes an email even though I'm not authorizing an email scope (neither on the server or discord's side has it set)
This doesn't help me. I don't want to do it myself
Didn’t mean to sound passive aggressive. I just want this module to work, if it doesn’t then I’ll just move on
I’m not sure if I’m doing something wrong on my side or what
Here is how I do it.
Might give you some help I hope
I appreciate the contribution here, but I actually moved on to using https://lucia-auth.com
Lucia
Lucia documentation
Lucia is an open source auth library that abstracts away the complexity of handling sessions.
It's really good, more powerful than nuxt-auth-utils
I think I found your problem
In local dev will return: http://localhost:3000/auth/discord
even when coming back off https
resulting in a invalid redirect uri error on discord side
you have to include the localhost:3000 on the discord dashboard to
which will fix this local dev side issue and in bare essence just work
I helped rewrite the provider for discord and linkedin on nuxt auth utils, i read you already moved on to lucia, which is also a nice way of doing it
if you wanna extend the user object beyond the name, you def will need to dive into the discord scopes
the reason for scoping email without submitting is this piece of code:
&
if you dont want the email to be appended set:
and it will only scope in 'identify' which is mandatory, then follow the normal route for extending the user object.
That didn’t happen. URI was correct and did redirect correctly
Everything worked besides the session
just to double check, you do use SSR and not noly SSG right?
Yes always
im down to help you out if interested
lucia is great too but imo nuxt auth utils should be enough
Not anymore, I appreciate the contribution to the thread tho
Hopefully it helps someone else
I do feel interested to explore the problem you had with it, could you help me with a one liner describing where and when the issue happened for you? Is it when you add custom data to the user/session object?
what I have now is:
- no session being stored
- and second you had trouble with the extended user object?
^
did it set: username at all for you?
No. Nuxt dev tools also shown session was always null
No matter what
thank you, ima dive into it
i tried setting up a clean repo yesterday to reproduce your error
I think it works better personally especially how easy it is to integrate different types of databases and it has good http safety
lucia is fun ngl, i tried v2, fell in love with it, then migrated to v3 which im currently fighting
If you got issues their discord could be a great place to ask
im there too 😛
Oh, just let me know!
some nice fellow over there helped me with a working drizzle/ luciav2 nuxt repo on github
i took his repo and updated it to the experimental db0 version
and migrated to lucia v3
but having issues https://github.com/justserdar/jsd-nuxt-turso-drizzle, main is fine, i got the issues in nightly+lucia branch
Feel free to create a thread there. There are a few nuxt nerds there including me
I might do that actually
I seem to be having the same issue as described here, and would like to solve it (keeping with
nuxt-auth-utils
instead of switching to a different library)
https://github.com/atinux/nuxt-auth-utils/issues/165GitHub
Sessions not being set after successful authentication (
loggedIn
...I am having an issue that others seem to have encountered before (cf. this Discord thread or perhaps this issue), but have not been able to figure out a solution: Sessions are not being set after s...