Skip to content

Keep the URL hash when returning after login - #437

Merged
aamoghS merged 1 commit into
devfrom
fix/login-keep-hash
Sep 25, 2026
Merged

aamoghS merged 1 commit into
devfrom
fix/login-keep-hash

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Automated PR tracking changes from fix/login-keep-hash into dev.


Note

Low Risk
Small, localized change to login redirect construction with added tests; no changes to open-redirect guards in safeCallback.

Overview
loginHref() now preserves the URL hash when building the post-login callbackUrl, so deep links like /club?x=1#history no longer drop the fragment and land users on the default tab after sign-in.

The change appends window.location.hash alongside pathname and search. A new Vitest suite mocks window to assert the encoded login URL and that safeCallback still accepts hash-bearing paths.

Reviewed by Cursor Bugbot for commit 847e508. Bugbot is set up for automated code reviews on this repo. Configure here.

Review follow-up to #426. loginHref built callbackUrl from pathname and
search only, so the hash was dropped. /club and /hackathons pick their
tab from it, so a shared or refreshed #history / #projects link came
back to the default tab after sign-in. safeCallback already accepts
fragments, and both the email-code and OAuth paths pass them through.
@github-actions
github-actions Bot requested a review from aamoghS September 25, 2026 14:39
@aamoghS aamoghS changed the title Feature: fix/login-keep-hash to dev Keep the URL hash when returning after login Sep 25, 2026
@aamoghS
aamoghS merged commit 0daeafc into dev Sep 25, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant