Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

Session redo #64

Merged
merged 4 commits into from
Feb 1, 2023
Merged

Session redo #64

merged 4 commits into from
Feb 1, 2023

Conversation

markphelps
Copy link
Contributor

Slight session refactor:

  • remove unneccessary info from session data
  • renamed flipt to session since its used by the SessionProvider
  • added two fields required and authenticated to make logic of if auth is required and if user is logged in simpler
  • base64 encode session value
  • merged in changes from fix: clear session on logout #60

With Auth

CleanShot 2023-02-01 at 10 33 41

Base64 decoded:

{"authenticated":true,"required":true,"self":{"id":"8c4a8613-ee9b-473f-919c-801455400365","method":"METHOD_OIDC","expiresAt":"2023-02-02T15:28:18.436540Z","createdAt":"2023-02-01T15:28:18.436542Z","updatedAt":"2023-02-01T15:28:18.436542Z","metadata":{"io.flipt.auth.oidc.email":"mark@flipt.io","io.flipt.auth.oidc.email_verified":"true","io.flipt.auth.oidc.name":"Mark Phelps","io.flipt.auth.oidc.picture":"https://lh3.googleusercontent.com/a/AEdFTp6IhGYsbE2F8Y3xsvrfOg_zYSNjWi04GiydVs1m=s96-c","io.flipt.auth.oidc.provider":"auth0"}}}

Without Auth

CleanShot 2023-02-01 at 10 36 55

Base64 decoded:

{"authenticated":false,"required":false}

@markphelps markphelps requested a review from a team as a code owner February 1, 2023 15:38
Copy link
Contributor

@darinmclain darinmclain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@markphelps markphelps merged commit 48b7a88 into main Feb 1, 2023
@markphelps markphelps deleted the session-redo branch February 1, 2023 16:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants