Visitor Authentication using Node - Cookie token #817
Unanswered
DmitrijBuckovsky
asked this question in
1. How to
Replies: 1 comment 1 reply
-
There is no direct way to logout a user, but there are 2 options you can explore:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I’ve implemented Visitor Authentication using Node and Auth0. Everything is working, and I can manage access to GitBook pages according to Auth0 roles (which are included in the Auth0 JWT).
However, if I make changes on the Auth0 side (e.g., remove a role from a user) and call
/login
(a route provided by the express-openid-connect library) or wait until the Auth0 access token expires, GitBook does not reauthenticate me. I think it maintains its own session using the cookiegitbook-visitor-token~xxxxxx
. I believe GitBook does not call the Fallback URL to reauthenticate with Auth0 until this cookie expires. If I delete this cookie via Developer Tools and refresh the secured page, the login process starts again.Is it possible to ‘logout’ from GitBook as well? Or is there a way to delete or modify the cookie’s max-age (currently set to 7 days)?
Beta Was this translation helpful? Give feedback.
All reactions