Skip to content
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

Google oauth2 #31

Closed
elsacutealways opened this issue Mar 11, 2023 · 3 comments
Closed

Google oauth2 #31

elsacutealways opened this issue Mar 11, 2023 · 3 comments

Comments

@elsacutealways
Copy link

How to send google oauth2 initial request?

@ganigeorgiev
Copy link
Member

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:

  1. Somewhere to show the "Login with ..." links. The auth urls could be generated via pb.collection(collectionIdOrName).listAuthMethods().

  2. 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.

@elsacutealways
Copy link
Author

Any dart code examples?
Why this is not described in the docs?

@ganigeorgiev
Copy link
Member

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 pocketbase/pocketbase#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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants