MaikuB / MaikuB/flutter_appauth

iOS endsession not returning answer

Open
#433 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Objective-C
Stars
308
Forks
301
Avg merge
2d 11h
Merged PRs (30d)
5

Description

So on android it works perfect. On iOS - the pop up "domain name wants to sign you in"
after conformation - the webview is open and closed but the code won't proceed.
if the user press cancel on the pop up - an exception is called, which is fine.
The logout by the way - is succeeded (I see on auth0 logs) but the code stuck (it awaits the result).
This is code:

` Future logout(String idToken) async {

String logoutUri = REDIRECT_URI;

final AuthorizationServiceConfiguration _serviceConfiguration = AuthorizationServiceConfiguration(

authorizationEndpoint: this._issuer + 'authorize',

tokenEndpoint: this._issuer + 'oauth/token',

endSessionEndpoint: this._issuer + 'v2/logout?returnTo=$logoutUri',

);

return await _appAuth.endSession(EndSessionRequest(

idTokenHint: idToken,

discoveryUrl: this._discoveryURL,

serviceConfiguration: _serviceConfiguration,

issuer: this._issuer,

preferEphemeralSession: false,

postLogoutRedirectUrl: logoutUri));
}`

So no results from _appAuth.endSession(..) although no webview is present anymore.
What to do?

Also, the cookies on Android are not deleted :(

Contributor guide

Open the contributing guide

Research direction

Start at the logout method and its _appAuth.endSession(EndSessionRequest(...)) call, comparing the iOS flow with the Android behavior described. Reproduce the Auth0 logout flow and inspect whether the iOS call returns after the webview closes; done means the iOS logout returns a result and the reported Android cookie behavior is understood or corrected.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.