Skip to content
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

Authentication function #9

Open
JFGHT opened this issue May 27, 2018 · 2 comments
Open

Authentication function #9

JFGHT opened this issue May 27, 2018 · 2 comments

Comments

@JFGHT
Copy link

JFGHT commented May 27, 2018

https://imgur.com/a/vXW4hwH

I'm having this issue at executing the auth. Any idea what could it be wrong?

This is working:

jwt {
  role
  userId
}

Btw: how to de-authenticate?

@tobymurray
Copy link
Owner

Any idea what could it be wrong?

I just gave it a try following the readme and it seemed to work for me. What version of everything are you using? What OS? I just noticed that this is still using the postgraphql dependency, so I'll have to update it.

Btw: how to de-authenticate?

By that I assume you mean revoke the authorization associated with a JWT? Generally, you don't "de-authenticate" with JWTs, you just wait for them to expire. One of the driving use cases for JWTs is statelessness, and to invalidate a JWT you'd have to store that it was no longer valid (store state). That said, it's not uncommon to have a blacklist of JWTs because actual statelessness is hard... here's a StackOverflow answer that discusses it.

@JFGHT
Copy link
Author

JFGHT commented May 28, 2018

Thanks for the fast answer.

1.- Versions:

  • "postgraphile": "^4.0.0-beta.9".
  • "express": "^4.16.3".
  • psql (PostgreSQL) 9.5.12.
  • Linux Mint (Ubuntu based).

2.- I answer myself: just removing the token from the client should help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants