hey can someone help me setting up google auth with pocketbase and reactidk where to even start

hey can someone help me setting up google auth with pocketbase and react idk where to even start i am a beginner in general and pocketbase
27 Replies
Jochem
Jochem9mo ago
PocketBase - Open Source backend in 1 file
Open Source backend in 1 file with realtime database, authentication, file storage and admin dashboard
indee
indeeOP9mo ago
yea bro i have seen but i am unable to use the oauth the documentation only shows how to get the jwt token after the oauth
Jochem
Jochem9mo ago
google auth is oauth
indee
indeeOP9mo ago
and how can i use that ?
Jochem
Jochem9mo ago
Before starting, you'll need to create an OAuth2 app in the provider's dashboard in order to get a Client Id and Client Secret, and register a redirect URL Once you have obtained the Client Id and Client Secret, you can enable and configure the provider from your PocketBase admin settings page.
indee
indeeOP9mo ago
i did that . after that i am stuck
Jochem
Jochem9mo ago
"stuck" is surprisingly hard to help with, without a lot more information.
indee
indeeOP9mo ago
i mean somehow i need to access the google Oauth page which give me jwt token right . i am unable to figure out that the consent form some how i need to get there but how
Jochem
Jochem9mo ago
set that up, and from there it's the instructions in the original link. The all-in-one should do everything for you
indee
indeeOP9mo ago
OH thanks bro . this is what i am searching for ig . i just dint know where to find it bro i am getting another kind of error now
indee
indeeOP9mo ago
No description
Jochem
Jochem9mo ago
No description
Jochem
Jochem9mo ago
you have to set that up the same in both sides of the application (and just a friendly request, please don't call me bro)
indee
indeeOP9mo ago
Okay i dont what wrong i am doing actually
indee
indeeOP9mo ago
No description
indee
indeeOP9mo ago
these are the urls i gave and i have a doubt should i give the react part of urls or pocketbase ones
Jochem
Jochem9mo ago
When creating your OAuth2 app, for a callback/redirect URL you have to use the https://yourdomain.com/api/oauth2-redirect (or when testing locally - http://127.0.0.1:8090/api/oauth2-redirect ).
indee
indeeOP9mo ago
No description
indee
indeeOP9mo ago
i did that also not working yet
Jochem
Jochem9mo ago
you have to change the port to the one you're actually using
indee
indeeOP9mo ago
which one the frontend side or the backend side ? according to this the request goes from the backend so it has to be backend one right ?
Jochem
Jochem9mo ago
you have two servers listening? whichever one pocketbase is using, anyway
indee
indeeOP9mo ago
No description
indee
indeeOP9mo ago
No description
Jochem
Jochem9mo ago
does it give you any errors? or the same one?
indee
indeeOP9mo ago
yea same same errors okay ig will try again . there are two apis pocketbase one and react one ill get back to you again one min its not working
Want results from more Discord servers?
Add your server