pocketbase / dart-sdk

PocketBase Dart SDK
https://pub.dev/packages/pocketbase
MIT License
505 stars 51 forks source link

Can't create new user with OAuth (404 from PB) #38

Closed NomadicDeveloper22 closed 1 year ago

NomadicDeveloper22 commented 1 year ago

I want to create a new user using OAuth from the client

final userData = await pb.collection('users').authWithOAuth2('google', (url) async {
      await launchUrl(url, mode: LaunchMode.externalApplication);
});

The window opens in a new browser, I sign into Google, I'm redirected to a page that shows:

{"code":404,"message":"Not Found.","data":{}}

Then nothing happens. I tried different Google accounts. Using latest version of the pocketbase sdk and url_launcher. No existing user in pocketbase with the same email as the google accounts, not even admin

And no rules restricting create access to users collection

Google is also enabled in my list of OAuth providers with the correct client id and secret

NomadicDeveloper22 commented 1 year ago

I am using pocketbase version 0.14.5 and will update the server and see if that fixes it

NomadicDeveloper22 commented 1 year ago

Unfortunately since I'm using Pockethost.io for the time being, I have to wait until it is updated for 0.15.1

Closing this for now, will reopen if the issue persists after update