Skip to content

Redirect back to the UI to show login errors #7

@changesbyjames

Description

@changesbyjames

Right now login can fail for a variety of reasons:

  • the user can back out of the twitch login
  • the login can be reused (we use a single use state value to prevent reuse/csfr)
  • the login could have taken more than 10 mins (avoid replays)

The login flows goes as follows:
UI /auth/signin -> API /auth/signin -> Twitch -> API /auth/redirect -> UI /auth/redirect.

Currently if an error occurs that last redirect doesn't happen, the user is just presented with an ugly raw text error message and is stuck on the API url with no way to recover.

To fix this, rather than returning a response with an error, we return a redirect back to the UI but /auth/error?message=The login expired.... then we render the message properly and give an option to try again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions