Remove login/auth; keep session bookmarks in localStorage#30
Merged
Conversation
Closes #28 - Drop Google OAuth + AuthContext providers and the axios Bearer interceptor - Delete Login, AuthContext, useStarSession and the API-backed StarIcon logic - Strip the token injection from every getServerSideProps - Remove @react-oauth/google and cookies-next deps - Reimplement session bookmarks + the My Sessions filter fully client-side via localStorage (no backend), scoped to the live sessions page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #28
Mirrors the same change in droidconKE/droidconKE2022Web#133. Removes the Google login / auth stack. The only user-facing feature that relied on auth was starring sessions (My Sessions), so I reimplemented that client-side with localStorage — no backend needed (per the option flagged in the issue).
Auth removal
GoogleOAuthProvider+AuthProviderfrom the layout; deletedAuthContext,Login,useStarSessionand the API-backedStarIconlogicBearertoken interceptor and thegetCookie('token')injection from everygetServerSideProps@react-oauth/googleandcookies-next; droppedNEXT_PUBLIC_GOOGLE_CLIENT_IDfrom.env.exampleSession bookmarks (no auth)
useStarredSessionshook stores starred session ids in localStorage and syncs every star icon + the filter (in-tab event + cross-tabstorage)My Sessionsnow filters the already-loaded schedule by starred ids instead of calling the auth-gatedbookmarked_scheduleendpointMy Sessionsare scoped to the live sessions page; past-events pages are unchangedFeedback/reviews were already anonymous server-side, so nothing there needed to change. Build and lint are green.