Skip to content

Session lifespan for multiple schemas/devices #2409

Answered by vinckr
amzu-dev asked this question in Q&A
Discussion options

You must be logged in to vote

You are right currently you can have only one lifespan set.

Both workarounds you proposed are possible:

a separate Kratos instance for mobile devices with a longer session.lifespan set? and one for browsers to have a shorter session.lifespan and point to the same database?

This works.

one schema for mobile devices and one for web/browsers and configure different session lifespans in the same Kratos instance?

This also works.
You can configure different identity schemas, e.g.:

schemas:
  - id: customer
    url: base64://ewogICIkc2NoZW1hIjogImh0dHA6Ly9qc29uLXNjaGVtYS5vcmcvZHJhZnQtMDcvc2NoZW1hIyIsCiAgInR5cGUiOiAib2JqZWN0IiwKICAicHJvcGVydGllcyI6IHsKICAgICJiYXIiOiB7CiAgICAgICJ0eXBlIjogInN0…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by vinckr
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants