New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't send token with login request #136

Closed
pedantic-git opened this Issue Apr 11, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@pedantic-git
Contributor

pedantic-git commented Apr 11, 2018

What problem does this feature solve?

I currently have Nuxt hooked up to a Rails app with Devise-JWT handling authentication on the backend. It all works well apart from one thing:

When a token expires on the backend, I can't log in again from Nuxt.

The reason is that Nuxt sends the old token along with the login request, and Devise-JWT validates this before checking for the username and password.

What does the proposed changes look like?

I don't think it makes sense to ever send the token along with login requests, because the whole point of a login request is to issue a token. Can Nuxt just skip sending the token when the request is coming from the loginWith() method?

An alternative would be to always delete tokens completely from the store before login requests, and this is what I'm doing to work around this right now.

This feature request is available on Nuxt.js community (#c101)

@cmty cmty bot added the cmty:feature-request label Apr 11, 2018

@pi0

This comment has been minimized.

Member

pi0 commented Apr 11, 2018

@pedantic-git I agree with unsettling token before loginWith. Please make a PR.

@pedantic-git

This comment has been minimized.

Contributor

pedantic-git commented Apr 11, 2018

Hi @pi0 - I'm not particularly familiar with the internals of the auth-module. Would you recommend I do this in the core, or in the local scheme?

pedantic-git added a commit to fishpercolator/auth-module that referenced this issue Apr 18, 2018

@pedantic-git

This comment has been minimized.

Contributor

pedantic-git commented Apr 18, 2018

OK - I had a dig around and have proposed a solution in #151

@pi0 pi0 closed this in b6cfad4 Apr 20, 2018

@pi0

This comment has been minimized.

Member

pi0 commented Apr 20, 2018

Will be released soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment