Questions tagged [nuxt-auth]
187 questions
8
votes
1 answer
Nuxtjs: How to use HttpOnly Cookies for Nuxt-Auth strategy
I worked previously with Vuejs and decided to take a look into NuxtJs. In my previous applications my server sends a HttpOnly cookie which my client couldn't read. So for auth I tried out NuxtAuth which has some startegies and I noticed that it is…

Funkberater
- 775
- 8
- 16
7
votes
2 answers
defu__WEBPACK_IMPORTED_MODULE_3__ is not a function
Has anyone ever encountered this error when using nuxt-auth from this official guide? How did you solve it? I'm stuck here for days.
The error is defu__WEBPACK_IMPORTED_MODULE_3__ is not a function

Neville Lemein
- 177
- 1
- 9
5
votes
2 answers
Nuxt auth user reset after browser refresh
i'm building an app with user login and register info. I use nuxt/auth module for handling the authentification. Whenever the user get logs in the state changes to true without a problem. The only issue i'm having is when i call set user method ,…

Sb Zakaria
- 311
- 6
- 18
5
votes
3 answers
nuxt auth : Google provider return invalid_request
I try to set google authentication with Nuxt Auth module, but I got following error from google:
Error 400 : invalid_request
Parameter not allowed for this message type: nonce
Here is my config
// nuxt.config.js
modules: ["@nuxtjs/axios",…

ZecKa
- 2,552
- 2
- 21
- 39
4
votes
2 answers
How to use process.env in the "auth" section of nuxt.config.js
I am new to Nuxt (using Nuxt 2.15.3 + Vue2 + Javascript).
I am having some difficulties with an AUTH_PROVIDER_URL environment variable which is set to be different on my local setup, on my staging servers and in the production environment. I am 100%…

Roger Hood
- 41
- 3
4
votes
4 answers
Get 401(Unauthenticated) error after login on laravel sanctum with nuxtjs
I have installed:
laravel v 7.30.4
nuxtjs v 2.15.7
After i login in my laravel sanctum with nuxtjs auth module, when nuxt try to get user, laravel response 401 error(Unauthenticated message).
My network status:
My cookies status:
api.php:
…

Omid Reza Heidari
- 658
- 12
- 27
4
votes
0 answers
Nuxt & axios configuration with a tenant subdomain designed API
Does anyone knows how I am supposed to manage Nuxt & axios configuration with a multi-tenant API built with django-rest-framework and django-tenants (https://github.com/django-tenants/django-tenants)?
This API is reachable by tenant subdomain:…

edge
- 41
- 1
4
votes
2 answers
Cannot read property 'Authorization' of undefined with Nuxt Auth & Axios
I have been using nuxt/auth-next and axios modules with nuxt project since last 3-4 months, everything was working fine since yesterday but now whenever I try to send axios request to public APIs without passing Authorization in headers, I get this…

aslamdoctor
- 3,753
- 11
- 53
- 95
3
votes
1 answer
NuxtJS3 + Nuxt auth-next - Cannot read properties of undefined (reading 'options')
I am using NuxtJS3 with @nuxtjs/auth-next and when I do npm install I get this error
ERROR Cannot read properties of undefined (reading 'options') 00:10:01
at…

squerty456
- 43
- 1
- 4
3
votes
3 answers
how to disable middleware in specific page, nuxt middleware
i have declare a middleware that check role of every routes in nuxt.config.js. but want to disable in some pages.
// in nuxt.config.js =>
router: {
middleware: ['role']
},
// in…

Sourav Adhikary
- 53
- 1
- 7
3
votes
2 answers
Nuxt Auth Module c5 doesn't refresh token automatically when token expires
Version
module: 5.0.0-1624817847.21691f1
nuxt: 2.15.8
Nuxt configuration
Universal
Nuxt configuration
// Auth: https://auth.nuxtjs.org/ (v5)
auth: {
redirect: {
login: '/account/login/',
logout: '/account/login/',
callback:…

Ryan H
- 2,620
- 4
- 37
- 109
3
votes
2 answers
how to keep user authenticated after refreshing the page in nuxtjs?
I'm using laravel passport for API's and nuxt.js for frontend after a successful login if I refresh the page the user is not authenticated anymore and loggedIn returns false, its my first nuxt.js project so I have no idea how to deal with that, any…

Dr.Noob
- 319
- 6
- 17
3
votes
0 answers
Watch nuxt-auth token changes
Is there anyway to watch token changes via watchState (when new token fetched via refresh token) or any other similar methods? I tried the following way but did not get any success!
this.$auth.$storage.watchState('token', v => {
…

iSun
- 1,714
- 6
- 28
- 57
3
votes
2 answers
nuxt auth-module "User Data response does not contain field XXX"
I'm trying to use nuxt-auth module, my settings for this module is
auth: {
cookie: false,
plugins: ['~/plugins/api.js'],
redirect: {
logout: '/login',
login: '/',
home: false
},
strategies: {
local: {
…

sangio90
- 179
- 1
- 3
- 10
3
votes
1 answer
Nuxt auth with cookies with DRF
I'm trying to implement authentication on my frontend (which is written in NuxtJS) using cookies as opposed to local storage.
I'm using the nuxt-auth package, with the following configuration:-
auth: {
strategies: {
cookie: {
token: {
…

bodger
- 1,112
- 6
- 24