Repository navigation
feat: admin page, Google sign-in and invite pages - #121
Merged
Merged
Conversation
/admin lists accounts (disable, enable, delete with confirmation) and invites (create with a one-time link, status, revoke). Sign in offers Google with callback outcomes; /invite shows the invited email and starts Google sign-in. Settings shows a Google user's email and links the admin page. Bootstrap user gains email.
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.
Stack 3/3: admin page, Google sign-in and invite pages.
admin.tsx(new) renders/adminfor the admin only: Invites (create with the one-time link shown once with Copy, status badges, revoke with confirmation; setup hint when Google is not configured) and Accounts (disable and delete with confirmation, enable; no actions on the admin).account.tsx: Sign in offers "Continue with Google" when configured and reports callback outcomes once (?signin=cleared);/invitereads the fragment, drops it from history, looks up the invite, shows the email and starts Google sign-in with it (re-reads onhashchange); Settings shows a Google user's email and links the admin page; sharedAccountPagelayout.main.tsxroutes/inviteand/admin; members and local mode are redirected away from/admin.AccountUsergains required nullableemail(latest Google email; null for the admin), served by a newGoogleEmailread. Anonymous auth requests (Google start, invite lookup and start) carry no CSRF and never trigger sign-out. Local mode unaffected.mise run checkand pre-push pass. New browser tests: Google start without CSRF and callback message once, no Google action when unconfigured, invite page (secret hidden, start with token), unusable invite, second invite in the same tab, member email and no admin access, admin invite create/link/revoke, disable/enable/delete with confirmation and CSRF. Real binary in a browser: setup, Settings link,/admininvite creation, signed-out/invite, revoke then invalid link; "Continue with Google" reached Google (fake client rejected as expected). Member actions were exercised with mocked routes and Go tests, not a real Google account./adminand/invitereviewed; existing primitives only (Button,Input,Badgestatus tones,ConfirmDialog,ErrorState); confirm dialogs focus Cancel; all actions keyboard reachable with labels;check:designpasses; Pierre untouched.