Skip to content

feat: account switcher - #79

Merged
haileyok merged 6 commits into
haileyok:mainfrom
shi-gg:feat/account-switcher
May 19, 2026
Merged

feat: account switcher#79
haileyok merged 6 commits into
haileyok:mainfrom
shi-gg:feat/account-switcher

Conversation

@shi-gg

@shi-gg shi-gg commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@shi-gg

shi-gg commented Apr 14, 2026

Copy link
Copy Markdown
Contributor Author

fuck wrong repo, dont merge yet

shi-gg and others added 5 commits April 14, 2026 16:50
Parse redirect targets and query_params with net/url, then merge into a single encoded query string to avoid malformed URLs when next already has a query or query_params starts with ?.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reuse a single session-account fetch path for signin/account/oauth authorize flows by returning both the active repo and account list from one helper.

This removes repeated per-account queries on page render while preserving existing behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Introduce ErrSessionUnauthenticated and treat only that case as a signin redirect.

Return server errors for account/session lookup failures in account and oauth authorize/revoke flows so backend issues are not masked as re-login prompts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Populate authorize/account template render data for all paths, harden account switch against cross-site POSTs, and apply consistent account session cookie options on save.

Also fix pointer-to-range-variable in session account lookup.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use explicit .Repo.Did in account switcher templates to avoid ambiguous embedded Did fields in RepoActor.

Reuse the already-loaded session in oauth authorize by adding a helper variant that accepts an existing session instead of re-fetching it.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@shi-gg

shi-gg commented Apr 14, 2026

Copy link
Copy Markdown
Contributor Author

it works (also with login_hint; the dropdown is just useless when a login_hint is present, will fix)
image

@shi-gg

shi-gg commented Apr 14, 2026

Copy link
Copy Markdown
Contributor Author
Screencast.From.2026-04-14.17-48-04.webm

@haileyok haileyok left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

hell yeag, thank you!

@haileyok
haileyok merged commit 4bd740d into haileyok:main May 19, 2026
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.

2 participants