Double redirect results in no toast message
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- typescript
- Domain
- authorization, backend
Research direction
Start by reproducing the deep URL flow through the loaders: /route/sub-route redirects to /route, which redirects again to /. Inspect the redirectWithError calls and the existing toast middleware tests. Done means the toast message is displayed after the second redirect, with coverage for this nested access-control case.
Written by the indexing model from the issue text.
Description
After migrating to using toast middleware, we have a regression where we have some access controls in our loaders and redirect to parent routes if no access is allowed.
Our tests have picked up an edge case where a direct url is used to a deep page /route/sub-route which kicks the user back to /route if they don’t have access for that page either and immediately redirected for a second time to / then no toast is displayed.
Our code was using return redirectWithError, I have also tried to change to return await redirectWithError and throw await redirectWithError but neither seems to being the toast message back.
- Dominant language
- TypeScript
- Stars
- 260
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from code-forge-io/remix-toast
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
code-forge-io/remix-toast#52 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
code-forge-io/remix-toast#50 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
code-forge-io/remix-toast#41 · 8 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
code-forge-io/remix-toast#37 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
code-forge-io/remix-toast#26 · 10 comments ·
All issues in code-forge-io/remix-toast
Similar issues
-
area:cli area:security bug priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
"code source" and "numerique.gouv" links: "new window" mention duplicated in the accessible nameOpenaccessibility
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
numerique-gouv/lasuite-landingpage#315 ·
Maintainers usually reply within 1 day
-
needs:triage
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
HyeokjaeChoi/vaultme#585 ·
Maintainers usually reply within 1 day
-
enhancement priority/P2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
beettlle/pi-smart-router#200 ·