Questions tagged [nuxt-auth]
187 questions
1
vote
2 answers
nuxt generate working ok locally for next JS auth reset-password but not when deployed to plesk server
I have a Nuxt JS app setup to use Nuxt Auth.
This works fine locally.
Specifically I am generating an email sent to the user with a link to reset their password of the…

Simon Taylor
- 607
- 1
- 9
- 27
1
vote
1 answer
Set token in Nuxt auth-module
I'm using Nuxt auth-module in my project. login API returns data in this structure:
data:{
data:{
user:{
bio: null
createdAt: "2021-06-29T12:28:42.442Z"
email: "name@info.co"
id: 1
image: null
…

Ehsan
- 766
- 10
- 17
1
vote
1 answer
Nuxt add property to component and access it in the middleware
I'm trying to develop a plugin for oidc-client to work with nuxt because @nuxtjs/auth does not work with my identity provider. Basically everything is working the only problem is that I need to add a custom property to the components and access it…

Andoni Zubizarreta
- 1,275
- 1
- 15
- 23
1
vote
1 answer
How to get user info after a successful authentication with nuxt-auth
I'm using nuxt.js, after I send a login request with email and password to the backend I get a response which contains a message, token and user informations, how can I access user informations in the response and save it inside some state in…

Dr.Noob
- 319
- 6
- 17
1
vote
1 answer
Where should I store my JWT token and what does httpOnly mean for a cookie?
I read documentation about auth.
I work on Nuxt project and my server returns a cookie HtppOnly
My questions :
A lot of confusion about the storing of the JWT token, some do not recommend using the localStroage
I also read we can copy the token…

Rifton007
- 291
- 1
- 5
- 24
1
vote
0 answers
Nuxt Auth 'loginWith' function doesn't send data to DRF
I recently tried to combine Nuxt.js with Django. Nuxt.js has a module called Nuxt Auth (I use @nuxtjs/auth-next), which is pretty straightforward and simple to use.
However, I ran into a problem when I tried to get the post data when using…

Andreas Gerasimow
- 43
- 1
- 9
1
vote
2 answers
NuxtJS auth redirect after logout to various paths, if needed
Did Google and read the documentation but no solution found yet, please suggest how to log out the user to different paths if needed.
My scenario/issue
If a user is verified and logout, should be redirected to
{domain}/login
If a user updates phone…

zarpio
- 10,380
- 8
- 58
- 71
1
vote
1 answer
Saving oAuth user - Nuxt auth - github strategy
I am trying to save the GitHub OAuth user logged to my user's database. I am using the Nuxt.js auth module for the functionality.
Auth setup in `Nuxt.config.js
auth: {
strategies: {
local: {
token: {
property: 'data.token',
…

nash08
- 39
- 1
- 5
1
vote
1 answer
Manually authenticating a user in Nuxt
If I have a url: /login/?token=, where valid_backend_token is an authentication token that my backend produced. Using this token, I can pretty much do anything that I want for my use case (including fetching user profile,…

DaveIdito
- 1,546
- 14
- 31
1
vote
2 answers
How to exchange code for access token with oauth2 using nuxt/auth-next
I am using "@nuxtjs/auth-next": "5.0.0-1618898588.9655d0e" for the authentication and I want to integrate google using it.
I have setup following code in nuxt.config.js
google: {
clientId: process.env.GOOGLE_CLIENT_ID_LATEST,
redirectUri:…

Rohit Shrestha
- 11
- 1
1
vote
2 answers
Nuxt.js custom role middleware doesn't work when page refresh
I have a simple application with some pages that need to be protected if the connected user is not an administrator.
I use the nuxt/auth package to handle the authentication:
auth: {
strategies: {
local: {
scopeKey: 'roles',
…

Spialdor
- 1,475
- 5
- 20
- 46
1
vote
3 answers
Nuxt auth not redirecting after logout
I just started playing with Nuxt for my current project. I am using DRF as the backend, and the local auth strategy with nuxt-auth works really well. However, when I log out, I have to refresh the page to go to the login page.
Here's my…

DaveIdito
- 1,546
- 14
- 31
1
vote
1 answer
Nuxt Auth loggedIn state getting cached
I am having issues with the Nuxt Auth loggedIn state. I am using Nuxt JS in universal mode, and I am authenticating with Nuxt Auth.
When a user logs out, the $auth.loggedIn state resolves appropriately in that session. I do not have a redirect…

user1666858
- 321
- 2
- 13
1
vote
2 answers
Nuxt auth returns me Bearer Bearer token
I am performing an authentication system with nuxtjs/auth, the main problem is that the token is sent from the back as follows: Bearer token...
When nuxtjs/auth processes it, it adds another Bearer to the beginning, being as follows: Bearer Bearer…

Josué Ayala
- 285
- 1
- 12
1
vote
0 answers
How to set user in nuxt auth after refresh?
Here is my auth config:
auth: {
strategies: {
local: {
scheme: 'refresh',
token: {
property: 'jwtToken',
},
refreshToken: {
property: 'refreshToken',
data: 'refreshToken',
…

Alopwer
- 611
- 8
- 22