DEV Community

Cover image for How to setup nuxt-auth v6 authentication with the "credentials" provider on nuxt3 project

How to setup nuxt-auth v6 authentication with the "credentials" provider on nuxt3 project

muvengei.dev on July 22, 2023

nuxt-auth is an open source Nuxt module that provides authentication for non-static Nuxt 3 applications. - sidebase The easiest way to get starte...
Collapse
 
oussamalkd profile image
Oussama Louelkadi •

Thank you so much for your time.
This Article is clear enough and helped me to use auth module.

Collapse
 
geraldmuvengei06 profile image
muvengei.dev •

You're welcome!

Collapse
 
axon profile image
Jeff Spurlock •

Thanks for this. i found it right as i was about to give up because Sidebase and the nuxt-auth documentation is fucking terrible.

'how do you make a cake?'
sidebase: "oh, easy, you just combine the ingredients and bake it at the right temp."
'Uh... OK, mind telling me the ingredients and how long to bake it and at what temp?'
Sidebase: "hahahahaha, no fuck you."

Collapse
 
geraldmuvengei06 profile image
muvengei.dev •

Just read this 😂😂

Collapse
 
ochiengotieno304 profile image
Ochieng Otieno •

lol - almost gave too

Collapse
 
gold_collect_f4ea8cff451d profile image
gold collect •

this code help me and I like this

Collapse
 
chadere_nyore_0c3b8cdbccb profile image
Chadere Nyore •

Hi, so I am stuck here, I get a successful login, but sidebase doesn't save the state, I need to signin after every reload. What could be the problem?

Collapse
 
fabiovaz profile image
Fabio Vaz •

Thank you!

and to implement authentication with Google instead of local, but in the same code pattern

Collapse
 
geraldmuvengei06 profile image
muvengei.dev •

I will to a complete Nuxt auth series. We can build a simple project while at it.

Collapse
 
geraldmuvengei06 profile image
muvengei.dev •

Nice suggestion. I'll write one for third party authentication

Collapse
 
jeppepepp profile image
JeppePepp •

What about handling refresh tokens? Also can you show a example of how to in smart way use your cookie/jwt to make calls to a custom backend api?

Collapse
 
geraldmuvengei06 profile image
muvengei.dev •

I'm working on an all round nuxt app with all the auth cases