-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to close browser with successful oauth using authWithOAuth2? #39
Comments
I'm not able to reproduce it locally using flutter desktop (linux) and the It works as expected for me - the browser tab/window is closed after completing the OAuth2 sign-in/sign-up flow. If Alternatively, if you want to have full control over the OAuth2 flow, you can try the more traditional approach with the manual code exchange flow and a deeplink redirect similar to the web example shown in the "Manual code exchange" example. |
Alternatively, since I haven't tested it on actual mobile device to see how it behave, if the opened chrome custom tab is not closed with the Otherwise I can't think of other solution without deeplinks. |
@TheRedSpy15 Could you try with the From the MDN docs of
I rarely use my phone and have a very old rooted galaxy s3, but I'll try to test it sometime later today to explore the available options. |
@TheRedSpy15 I've tested it on my device and the auto close works with the There is also an open issue for autoclosing a chrome custom tab when sent to background that is kindof related - https://bugs.chromium.org/p/chromium/issues/detail?id=543542. In any case, I don't think there is much we can do in the SDK without a deeplink. The UX in my opinion is not that bad in this case and it will work practically with all cases even in the rare scenarios where a chrome based browser is not installed on the device. The generic message will be available with the next minor PocketBase v0.15.2 update sometime later this week. |
Using the following:
A browser is opened and authentication succeeds. But how can I close the browser once the user is authenticated?
I also tried
flutter_custom_tabs
but that seems to be no longer maintained and does't have a way to close the tab as far as I can tellI thought
authWithOAuth2
was supposed to close the broswer automaticallyThe text was updated successfully, but these errors were encountered: