Questions tagged [nuxt-auth]
187 questions
1
vote
1 answer
@nuxt/auth send me to /login page when I reload the page or access URLs manually
I'm trying to implement a login system in my app (Nuxt 2) using @nuxt/auth. The backend is a Node.js + Express + Passport, using sessions and cookies.
I think it's important to say I'm using http-proxy-middleware in my front end, so my back end can…

andreycwb
- 21
- 5
1
vote
0 answers
Calling the auth function will call the wrong url
I'm using the Nuxt/Auth library in a NuxtJs project. I'm trying to make a login request to my backend. So I don't use any of the existing schemes that the library has prepared by default.
This is what my configuration looks like in…

Kristián Bukva
- 11
- 3
1
vote
1 answer
In Nuxt Auth plugin, how to pass localstorage prefix parameter ? Prefix must be window.location.hostname
In nuxt.config.js
auth: {
localStorage: {
prefix: '[' + window.location.hostname + ']'
},
In output:
FATAL window is not defined 10:33:30
at…

VIktor
- 11
- 2
1
vote
0 answers
Nuxt 3 throw createError not reaching the custom error page
I am settting up an auth middleware which runs just fine, however when I am creating the error I just get to the default error page. I need to reach the custom ~/error.vue to insert a button to click clearError()
Docs says I can just add an error…

StefanGarofalo
- 73
- 7
1
vote
0 answers
Nuxt Auth login - working on localhost, 301 and 405 on server
My problem is, that login/logout works perfectly on my localhost, but as soon as I deploy it on a server I got 301 and 405 errors, with the "The GET method is not supported for this route. Supported methods: POST" message and I cant figure it out…

Dávid Schnellbach
- 11
- 1
1
vote
0 answers
Laravel-Nuxt Sanctum CSRF mismatch when deployed
I have two separate projects frontend nuxt and backend laravel. I used netlify to deploy frontend and Hostinger to deploy backend. I used Nuxt auth and laravel sanctum as authentication. Even if the application runs without any problem in the local…

Nisitha Sankalpana
- 11
- 2
1
vote
0 answers
@nuxt/auth using query parameters for reddirect login
I have specified in the plugin (@nuxt/auth v.5.0.0) settings the following settings for redirection:
redirect: { login: '/?auth=login', logout: '/', callback: '/?auth=login', home: false },
And with a direct transition (it is with a direct…

Данил Пономаренко
- 39
- 3
1
vote
1 answer
Nuxt Authentification parameter for token
Guys! Currently I have a problem sending request for token. I'm using nuxtJS @nuxtjs/auth-next module. It's working great, but i faced a problem not sending client_secret. This request for authorization goes to AZURE AD. My config:
msalAzure: {
…

Creoad
- 11
- 3
1
vote
0 answers
window is not defined error from Nuxt auth-next Oauth2Scheme.logout() function
In my project, I use nuxt auth-next. To validate the current saved cookie I'm checking the following conditions in nuxtServerInit.
export const actions = {
async nuxtServerInit({ commit }, { app }) {
if (app.$auth.loggedIn) {
const token…

Sathya Molagoda
- 531
- 1
- 6
- 17
1
vote
1 answer
How to keep users logged in after browser close with nuxt auth?
I have the following inside my nuxt.config.js file:
auth: {
strategies: {
local: {
scheme: 'local',
token: {
property: 'meta.token',
global: true,
},
user: {
property: 'data',
},
…

Kos-Mos
- 415
- 1
- 5
- 15
1
vote
0 answers
NuxtJS Auth Runtime Configuration for Docker
I run my nuxt app inside a docker container, with the aim of building once, running many. When I run a container, I want to pass in NUXT_ENV_COMMUNITY_ID which would be different per container.
However, with the following setup, when I run my…

Flinty926
- 129
- 2
- 9
1
vote
1 answer
defu__WEBPACK_IMPORTED_MODULE_3__ is not a function nuxt auth
I keep getting the error defu__WEBPACK_IMPORTED_MODULE_3__ is not a function when running nuxt auth v5 while using this guide from the official documentation. Has anyone else ever encountered that problem? How did you solve it?
PS: It only appears…

Neville Lemein
- 177
- 1
- 9
1
vote
1 answer
hide axios call , and express routes in browser network tab
I am using nuxt app with express server routes, when I hit login or other api calls it shows in network. and apis are exposed .
I mean if some try it using postman he can get everything he wants.
so the question is > How to secure nuxt app…

Amjid Ali Shah
- 49
- 4
1
vote
2 answers
Forced page transition after login with nuxt/auth
Assumption
I am implementing a login function in nuxt/auth. I want to implement a guest login function, but when I press the button to log in as a guest, it doesn't go to /search, it goes back to user/login. I would like it not to go to the login…

Beginner Professional
- 327
- 1
- 10
1
vote
0 answers
Nuxt Auth redirects after refresh when cookie is set to false
I am using Nuxt-auth local strategy, I set the cookie in nuxt.config.js to false because my token is too large for cookie, but when I do that when refreshing the page it redirects me to login page.
Here is my auth configuration.
auth: {
cookie:…

Abdullah Qasemi
- 449
- 1
- 12