auth0 / auth0-flutter

Auth0 SDK for Flutter
https://pub.dev/documentation/auth0_flutter/latest/
Apache License 2.0
59 stars 41 forks source link

Error logging in in sandboxed app #394

Closed Cpruce closed 9 months ago

Cpruce commented 9 months ago

Checklist

Description

After logging in via google in a safari instance that gets spawned, I receive the following error

flutter: ERROR: OTHER: An unexpected error occurred. CAUSE: Unable to complete the operation. CAUSE: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" UserInfo={_NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <92FD24A9-5674-4FC4-B0DE-EFF882B8A03B>.<1>, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=1, _NSURLErrorRelatedURLSessionTaskErrorKey=(
    "LocalDataTask <92FD24A9-5674-4FC4-B0DE-EFF882B8A03B>.<1>"
), _NSURLErrorNWPathKey=satisfied (Path is satisfied), interface: en0[802.11], ipv4, dns, uses wifi}

I think the issue is returning data from the safari instance to the test app.

From what I've seen, we need to add to the entitlements to fix this but I haven't found one that works. I've tried com.apple.security.device.serial and com.apple.security.network.client, but no luck so far.

Both ios and android work as intended. Only macos produces this issue.

Reproduction

  1. I believe this demo is sufficient for reproducing the issue.
  2. Build for macos.
  3. Try logging in using a connection.

Additional context

No response

auth0_flutter version

^1.5.0

Flutter version

^3.13.0

Platform

iOS

Platform version(s)

macOS 14.2.1

Widcket commented 9 months ago

Hi @Cpruce, can you please confirm you can indeed reproduce this on the example app?

Cpruce commented 9 months ago

Hi @Widcket, thanks! The example app worked! I found what the issue was too :)

I needed to set Outgoing Connections (Client) in App Sandbox (Debug and Profile)

Screenshot 2024-01-02 at 7 22 52 PM