MaikuB / MaikuB/flutter_appauth

Browser does not redirect back to app after logout (postLogoutRedirectUrl does not work)

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

Description

When doing:
```
await _appAuth.endSession(EndSessionRequest(
idTokenHint: idToken,
postLogoutRedirectUrl: postLogoutRedirectUrl,
serviceConfiguration: serviceConfiguration,
externalUserAgent: externalUserAgent
));
```

The app triggers the browser and successfully logs out the user. However, after that, it does not automatically redirect the user back to the app, as it does with login.

I can see that in the [example project](https://github.com/MaikuB/flutter_appauth/tree/master/flutter_appauth/example) the logout redirects the user to a website where there is a manual button to return to the app. In my case, I want to redirect the user directly to the app without having a button on the logout browser page.

Because of this, the only option is to have the user manually exit the browser to return to the app, which triggers `AppAuth Error: The user cancelled the flow!` and does not get information back on whether the logout was successful or not.

Contributor guide

Open the contributing guide

Research direction

Start with the example project and the EndSessionRequest usage shown in the issue, then trace how the Android and iOS flows handle postLogoutRedirectUrl. Compare the logout callback behavior with login and determine whether the app receives a direct return and logout result without manual browser exit.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, 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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.