Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set public env vars on cookie in middleware, read in client hook #3383

Draft
wants to merge 17 commits into
base: feature/nextjs-auth
Choose a base branch
from

Conversation

doug-s-nava
Copy link
Collaborator

Summary

Fixes #{ISSUE}

Time to review: x mins

Changes proposed

What was added, updated, or removed in this PR.

Context for reviewers

Testing instructions, background context, more in-depth details of the implementation, and anything else you'd like to call out or ask reviewers. Explain how the changes were verified.

Additional information

Screenshots, GIF demos, code examples or output to help show the changes working as expected.

doug-s-nava and others added 17 commits January 2, 2025 12:20
* adds route at /api/auth/callback to be hit by the flask API at the completion of the login flow
* adds jwt token parsing logic
* adds support for a "SESSION_SECRET" env var
* adds a User page for temporary testing
* adds a context provider and hook to allow client components to access up to date logged in user information
* adds a NextJS route to return user data decrypted from the session cookie passed up from the client
* makes some temporary updates to the feature flags table in order for that page
to act as a proof of concept for the functionality
* moves some feature flags and loading spinner code to a more suitable location.
Creates a Node route for logging out to log out a user, which
* calls the API logout endpoint
* removes client side cookie

Also adds fetch function to use to call the API logout route and a dummy logout button to use for testing
@doug-s-nava doug-s-nava force-pushed the feature-flag-manager-refactor branch from 03f25d3 to b8f15d0 Compare January 3, 2025 21:28
Base automatically changed from feature-flag-manager-refactor to feature/nextjs-auth January 6, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant