MaikuB / MaikuB/flutter_appauth

App stuck with 302 redirect and unable to log in with the OAuth2 provider

Open
#403 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C
Stars
308
Forks
301
Avg merge
2d 11h
Merged PRs (30d)
5

Description

The login flow is not continuing in the mobile app. (302 http code is being returned by /oauth2/userAuthorize with no follow up from mobile app in some android devices).

Your Environment

Plugin version: 4.2.0
Platform: Android
Flutter info (flutter doctor):
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.6, on macOS 12.6 21G115 darwin-arm (Rosetta), locale en-GB)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 14.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.73.1)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

Context
  1. AppAuth opens new customs tab (previously the user was in the native Android app)
  2. User click on login button.
  3. The server directly returns a 302 with a redirect, and the app get stuck.
Expected Behaviour :
  1. Chrome tabs should be closed, and the app should catch the intent and user should be able to log in after redirecting to the app login screen.
Actual Behaviour :
  1. Chrome tabs did not close. The app did not catch the intent and the user was unable to log in with the OAuth2 provider.
  2. Chrome tab close and nothing happened, no callback and follow up happen in the app and user is not able to login.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Android login flow described in the issue, focusing on AppAuth handling of the 302 from /oauth2/userAuthorize and the callback after the custom tab closes. Compare behavior on affected Android devices; done means the callback reaches the app and the OAuth2 login completes instead of leaving the user stuck.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
authentication, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.