Google OAuth Extension "Bad request" workaround
Hey all!
I've had issues with XANO's Google OAuth extension. I was continually getting "Bad request" for the "continue with google" part of the flow. Specifically in func_1 (google_oauth_getaccesstoken), when requesting an auth token from google after user successfully signs in.
I followed the demo video beat for beat, and it did not work.
The issue I found
The returned data after a user signs in includes a 'code' (nice!), but it does not include a redirect_uri (as the template would suggest). So the POST request to google for a token fails.
Solution
I just hardcoded the redirect uri (baseUrl/oauth/google/continue) in the POST request for that google_oauth_getaccesstoken function.
XANO team, plz correct me here if I'm wrong - just thought I'd bring it up since I was stumped for a while on this and following instructions.
Comments
-
Hi @Jswan are you saying the input value for redirect_uri is not being passed?
-
Indeed, that was my experience. I ended up just passing the redirect_uri manually, instead of automatically scooping it from params through the redirect from Google.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback