Repository navigation
fix(auth): return to the current page after sign-in - #681
Merged
Merged
Conversation
Continue the current page and query state after header sign-in, protected live navigation, and same-browser password recovery. Keep pending destinations local, short-lived, and consumed after authentication. Create the reset session after password-change revocation so completed recovery actually signs in.
The group can render its Past page before LiveView connects. Wait for that connection before clicking Join so the attribution scenario tests a handled action rather than a click on the initial static page.
Shrink the sign-in return work without changing what people see. - Build every "page + return_to" link with one AuthReturnTo.path/2, which drops unsafe destinations; remove eight local copies - Point "Sign in to RSVP" at the same address as the header link - Rebuild a protected LiveView's path from the router's live route metadata; a mount only sees params, and its host_uri is pruned - Move header, Past page, detour and unsafe-destination checks into the fast scenarios; keep only same-browser password recovery in the browser suite, which the fast client cannot follow, and note it in the browser README
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.
Choosing Sign in from a huddl or group currently loses the page and lands on Agenda. Return people to the page they were using, including a group’s Past page, saved Discover filters, and protected pages reached through live navigation.
Keep that destination through failed passwords, sign-up switching, and password recovery. A reset completed in the same browser resumes the journey for up to 30 minutes; a reset opened in a fresh browser keeps the normal home destination. Successful recovery signs in after older sessions are revoked. Joining and RSVPing remain explicit actions.
To check the change, sign out, open a public group, select Past and page 2, then use the header Sign in. The same archive content should remain after credentials. From a public huddl, follow Forgot your password and complete its reset email in the same browser; the huddl should return with RSVP available.