postgraphile-login icon indicating copy to clipboard operation
postgraphile-login copied to clipboard

Authentication function

Open JFGHT opened this issue 6 years ago • 2 comments

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?

JFGHT avatar May 27 '18 22:05 JFGHT

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.

tobymurray avatar May 28 '18 03:05 tobymurray

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.

JFGHT avatar May 28 '18 07:05 JFGHT