Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix routing loop #12959

Merged
merged 1 commit into from
Mar 27, 2019
Merged

Fix routing loop #12959

merged 1 commit into from
Mar 27, 2019

Conversation

chnn
Copy link
Contributor

@chnn chnn commented Mar 27, 2019

Closes #12892

If a user's session expires while they are viewing a modal, they will be taken through the following router flow:

  1. Start at

    /dashboards <-- current route
    
  2. Open modal, pushes modal route onto stack

    /dashboards/:dashboardID/export <--
    /dashboards
    
  3. Session expires, push signin route onto stack

    /signin?returnTo=/dashboards/:dashboardID/export <--
    /dashboards/:dashboardID/export
    /dashboards
    
  4. After signin, push returnTo onto stack

    /dashboards/:dashboardID/export <--
    /signin?returnTo=/dashboards/:dashboardID/export
    /dashboards/:dashboardID/export
    /dashboards
    
  5. Dismiss modal, which pops last route

    /signin?returnTo=/dashboards/:dashboardID/export <--
    /dashboards/:dashboardID/export
    /dashboards
    

This creates an infinite loop 💥

Instead, we want:

  1. Start at

    /dashboards <--
    
  2. Open modal, pushes modal route onto stack

    /dashboards/:dashboardID/export <--
    /dashboards
    
  3. Session expires, replace current route with signin route

    /signin?returnTo=/dashboards/:dashboardID/export <--
    /dashboards
    
  4. After signin, replace sign in route with returnTo route

    /dashboards/:dashboardID/export <--
    /dashboards
    
  5. Dismiss modal, which pops last route

    /dashboards <--
    

@chnn chnn force-pushed the ui-bugfix-routing-loop branch from 207a0b4 to 5fe66ec Compare March 27, 2019 22:14
@chnn chnn merged commit 9252677 into master Mar 27, 2019
@chnn chnn deleted the ui-bugfix-routing-loop branch March 27, 2019 22:22
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