LinusU / LinusU/flutter_web_auth

Issue prompting for authentication on OSX with Chrome as default browser

Open
#136 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
213
Forks
261
PR merge metrics
No merged PRs in 30d

Description

# Issue Description
When using `flutter_web_auth v0.4.1` on Darwin OSX (12.5.1) targets that have the default browser set to Chrome (Version 105.0.5195.102 (Official Build) (x86_64)), the authentication prompt opens and closes immediately afterwards, causing a `PlatformException`. If the default browser is set to Safari, the authentication flows work as expected.

# Steps to reproduce
1. Set Chrome as default browser in OSX
2. Start the authentication flow with the default browser (Chrome), using `flutter_web_auth v0.4.1`
3. See the chrome window open and immediately close
4. Stack trace:

```dart
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(EUNKNOWN, The operation couldn’t be completed. (com.apple.AuthenticationServices.WebAuthenticationSession error 3.), null, null)
#0 StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:653
#1 MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:296

#2 FlutterWebAuth.authenticate
package:flutter_web_auth/flutter_web_auth.dart:35

```

Contributor guide

No contributing guide indexed for this repository

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 authentication flow with Chrome set as the macOS default browser, then read flutter_web_auth.dart at FlutterWebAuth.authenticate and the reported AuthenticationServices.WebAuthenticationSession error. Done means the flow no longer closes immediately and completes without the reported PlatformException when Chrome is the default browser.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter, macos
Domain
authentication, desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.