shree_harsha
shree_harsha•10mo ago

How to set session time dynamically with custom login flow?

In my case, for some users, the session should be 24 hours. For others, it should be 30mins. Please let me know if that is possible to implement in custom login flow. If not then how to set some default session time.
3 Replies
FFO
FFO•10mo ago
I think it is possible with the session-api https://zitadel.com/docs/apis/resources/session_service_v2/session-service-create-session The lifetime flag lets you set a session duration.
ZITADEL Docs
Create a new session. A token will be returned, which is required for further updates of the session.
shree_harsha
shree_harshaOP•10mo ago
Thanks @FFO
FFO
FFO•10mo ago
Happy to help 😄

Did you find this page helpful?