Closed elsacutealways closed 1 year ago
You can find a web example flow in https://pocketbase.io/docs/authentication/#web-oauth2-integration.
For Dart, the expected flow should be similar, aka, you need 2 handlers:
Somewhere to show the "Login with ..." links. The auth urls could be generated via pb.collection(collectionIdOrName).listAuthMethods()
.
Somewhere to handle the Provider redirect (aka. deeplink) and perform the actual OAuth2 -> PocketBase authentication
If you still have questions, please file a new Q&A discussion in the main repo.
Please also note that the OAuth2 flow will be simplified in the near future as part of #55.
Any dart code examples? Why this is not described in the docs?
Sorry, there are no Dart examples for that at the moment.
You can check the community provided example in https://github.com/pchasco/pocketbase_google_login_flutter (and its discussion in https://github.com/pocketbase/pocketbase/discussions/442).
Why this is not described in the docs?
Because I don't have time and there are other tasks with higher priority at the moment. Docs contributions are welcomed (you can find the site repo in https://github.com/pocketbase/site).
How to send google oauth2 initial request?