authgear / authgear/authgear-server

Click "Back" after login would see error for invalid page

Open
#3,635 0 comments 0 reactions 0 assignees View on GitHub
cooldown/enhancement ux/minor
Dominant language
Go
Stars
2k
Forks
125
Avg merge
2d 17h
Merged PRs (30d)
32

Description

## Step to reproduce

In a web app using authgear to login.

1. Trigger login
2. Login on Authgear, redirected to the web app
3. Navigate "Back", see invalid page error

## Solution

This error message is expected for the oauth flow because the previous flow is already completed. However this is frustrating for the user because they got stuck in that page after accidentally back.

Alternatively, by manipulating the history stack, see if we can achieve the following:
- When clicking the back button for 1st time, goes to to the redirect page after login, so the user is redirected to the app again.
- If clicking the back button twice quickly, go to the page before login.

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by tracing the login redirect and browser history behavior in the web app flow, then determine whether the first Back action can return to the post-login redirect while two rapid Back actions reach the page before login; done means invalid-page errors no longer trap users after login.

Written by the indexing model from the issue text.

Assessment

Domain
authentication, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.