Header Sign in and Register buttons drop the return URL

Open Beginner friendly
#355 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Read shell/header/anonymous-menu/LoginButton.tsx and RegisterButton.tsx, then compare their links with the legacy AnonymousUserMenu.jsx behavior linked in the issue. Check how the shell gets the current page URL and run the relevant button tests if available. Done when both links include a return URL so users land back on the page they left.

Written by the indexing model from the issue text.

Description

Description

When an anonymous user clicks Sign in or Register in the shell header, they don't come back to the page they were on.

The legacy learning header sent the current page along: Register went to /register?next=<current page>, and Sign in used getLoginRedirectUrl() with the current URL.

The shell's LoginButton and RegisterButton link to the bare login and register URLs, with no next. This matters most on course pages, which is exactly where the legacy learning header was used.

Found by reading the code. I haven't reproduced it in a browser yet.

Dominant language
TypeScript
Stars
4
Forks
13
Avg merge
3d 5h
Merged PRs (30d)
4

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openedx/frontend-base

All issues in openedx/frontend-base

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.