aboutyou / dart_packages

Dart and Flutter plugins maintained and used by @ABOUTYOU
220 stars 149 forks source link

[sign_in_with_apple] Sign in with Apple not working on mobile web browsers in Flutter #431

Open Pedro-one opened 1 month ago

Pedro-one commented 1 month ago

I'm facing an issue with the "Sign in with Apple" feature in my Flutter web application. The sign-in process works fine on desktop browsers, but it fails when accessed through mobile web browsers.

In the case of Chrome it does login but you have to refresh the page to access the app, in other cases like Safari it just fails silently. I do suspect that the problem has to do with the sign in pop up not redirecting you correctly because checking out other platforms like Twitter they have a custom flow that doesn´t make that pop up appear.

I've searched for solutions, but there's very little information available on this specific problem.

Thank you in advance for your help!

tp commented 3 weeks ago

While I don't have a Flutter for web project in production (thus getting feedback for the behavior of a lot of users), I tested the plugin's example successfully in the browser.

Are you sure it's not a misconfiguration of the redirect domain? The screen sadly would not show a detailed error message (useful for a developer), but since the pop-up opens, that's usually the culprit (as there is not much one can to wrong, argument wise). (I would think a wrong redirect domain would error beforehand already though, not letting you choose the account, but I am not 100% clear whether that is true or whether indeed it's only checked at the end and thus could lead to an error like the one shown above. Just checked with a popular Flutter-web app using SiwA, and when modifying the redirect URL there to something invalid, it still shows the account picker first.)