LinusU / LinusU/flutter_web_auth
WebView Browser stays open after successful call to FlutterWebAuth.authenticate
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 213
- Forks
- 261
- PR merge metrics
- No merged PRs in 30d
Description
FlutterWebAuth 0.4.1
AndroidManifest.xml:
`
`
Flutter call:
`final result = await FlutterWebAuth.authenticate(url: _authorizationEndpointUrl, callbackUrlScheme: 'your-focus');
String? code = Uri.parse(result).queryParameters['code'];
print('MS365 Code: ' + (code ?? ""));`
This prints the Code correctly, but the WebView Browser remains open.
The relevant section of the logcat:
> 2022-07-29 14:41:03.954 515-540/? I/ActivityTaskManager: Displayed org.chromium.webview_shell/.WebViewBrowserActivity: +193ms
2022-07-29 14:41:03.957 515-535/? D/EventSequenceValidator: Transition from ACTIVITY_LAUNCHED to ACTIVITY_FINISHED
2022-07-29 14:41:04.063 515-5660/? I/ActivityTaskManager: START u0 {act=android.intent.action.VIEW cat=[android.intent.category.BROWSABLE] dat=your-focus://auth/?code=xxxxxxx&session_state=040e2895-c9fa-44ba-ba65-c94575313b7e cmp=com.your_focus.app/com.linusu.flutter_web_auth.CallbackActivity (has extras)} from uid 10088
2022-07-29 14:41:04.063 515-535/? D/EventSequenceValidator: Transition from ACTIVITY_FINISHED to INTENT_STARTED
2022-07-29 14:41:04.071 515-535/? D/EventSequenceValidator: Transition from INTENT_STARTED to INTENT_FAILED
2022-07-29 14:41:04.072 515-5660/? W/ActivityTaskManager: Tried to set launchTime (0) < mLastActivityLaunchTime (3102689785)
I am connecting to the Microsoft OAUTH to get a token for Microsoft 365 Graph API.
Any thoughts on a fix or further debugging would be appreciated!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the AndroidManifest.xml declaration for CallbackActivity and the supplied logcat sequence, then inspect how the callback activity handles the successful OAuth redirect. Reproduce the Microsoft OAuth flow and verify that the browser closes after the callback returns the code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- authentication, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100