Replies: 1 comment 1 reply
-
Myself I've been working only with The Keystone does not use an OAuth/OpenID mechanism. If the user enters the correct username and password, KS will generate a session cookie encrypted with a server secret using That cookie is valid until it expires. When it expires, the user has to log in again. If you want to see more technical details, you can look into the stateless session code. keystone/packages/core/src/session/index.ts Lines 62 to 125 in bd33f07 The auth module adds some more code to the session getter. keystone/packages/auth/src/index.ts Lines 161 to 192 in bd33f07 We also used passport and OAuth to authenticate users using third-party providers, but in the end, we still created a user session in KS. The flow was like this.
|
Beta Was this translation helpful? Give feedback.
-
Hey,
if you take an example of passport authentication, then what we can do there is we can assign two tokens i.e. access token and refresh token. The access token has a shorter life compared to refresh token and then when access token is expired, we pass refresh token to a api and get new access token instead of logging out the user.
So do we have the same mechanism in keystonejs? Because I cannot find anything in the document related to it.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions