Skip to content

should we redirect to the next instead of root once we cancel the current flow #12223

@j-z10

Description

@j-z10

Is your feature request related to a problem? Please describe.

I've created an application with an OAuth2/OpenID Provider. If I try to log in with that application, there are some params in the URL, such as client_id, grant_type, redirect_uri. But if I typed the wrong email and then clicked "Not you", the flow will be canceled and redirected to root /. however, the query parameters are gone. so even though the user successfully log in again, they won't be redirected to the redirect_uri

  1. first visit http://127.0.0.1:9000/application/o/authorize/?response_type=code&client_id=YOUR_CLIENT_ID&redirect_uri=http://example.com
  2. will redirect to the authentication flow http://127.0.0.1:9000/if/flow/default-authentication-flow/?next=%2Fapplication%2Fo%2Fauthorize%2F%3Fresponse_type%3Dcode%26client_id%3DYOUR_CLIENT_ID%26redirect_uri%3Dhttp%3A%2F%2Fexample.com
  3. input an email and then click "Log in"
  4. click "Not you" after the page content changed
  5. redirect to / with next=/

Describe the solution you'd like
It would be really nice if we could redirect to the next param in the authentication flow URL after we cancel the current flow.

Additional context

new-15.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions