Google auth via Xano (through modal) issues

Hi,
I set up login to show up on any page via a modal. I can confirm that regular email and password login works. However, I am having trouble setting up OAuth, specifically Google. I followed the written and video tutorials, but am still getting issues.

Attached is a video of the flow. When I login with Google, it creates a user in Xano with Google Oauth info, and it redirects to the page I want, but it doesn’t return Xano auth data, as the video shows.

What could be causing this? I tried redirected after Google login to both an open page, and alternatively to a page requiring authentication, but it didn’t work.

Thanks in advance for the help, and please let me know if you need any more background info for the problem.

Hey @Adam :wave:

Could you send screenshots of the authorized domains you setup in Google, as well as the redirect link?

It should look something like this:
CleanShot 2023-08-22 at 14.52.17

(Seems like to me that the domain is not set on Google, hence, not sharing cookies).

Also, could you try reloading your browser on the WeWeb app after having been redirected to it by Google, and checking if the user appeared?

Thanks

Thanks for your response Quentin.
In case its relevant, I am using the editor to test.

Auth domains:

UI structure:

Redirect URIs:

Results in Xano User table after successful Google OAuth (but UNsuccessfull redirect and UNsuccessfull weweb authorization token return)

@Quentin Are there any other screenshots I should take of the issue?

Hi, did you correctly authorize javascript origin too in the google console ?

You have ton configure it in your credentials screen on the google console :

Thanks @Alexis I tried that and am still having the same issue.

Here is what I added to that section

How about the Authorized redirect URIs, did you configure those as well?

The demo is with Supabase but perhaps this video might help.

@Joyce

Heres what i have for the redirect urls. The top one should redirect to a post-login page in the editor that automatically redirects to my original homepage, which includes the login popup/modal.

Ah sorry, you had shared those already. Didn’t see them the first time :woman_facepalming:

Let me try to reproduce this on my side and get back to you. I might not have time today. Would it be ok if I got back to you on Tuesday / Wednesday on this one?

@Joyce Fo sure! Thanks for your help! In addition, I’m having related but not exactly the same issues with Linked in OAuth.

Please let me know if I can provide you with any additional info

1 Like

Will do! I’m not very familiar with OAuth and have never set it up with Xano so LinkedIn might be a stretch for me but if you have time to record a short video of those issues as well, I’ll take a look :slight_smile:

Did you use the google auth plugin xano side ? Did you modify anything inside ?

@Alexis
Yes both for google and linkedin

@Alexis
I did not modify anything inside Xano. I followed this tutorial https://www.youtube.com/watch?v=FaTHPG9kUrk

The only meaningful difference (that I can see) between how I set up my flow vs. how Quentin set his up is that my login flow starts in a modal (in the home page) instead of a login page, and I redirect back to the original home page (that is public and doesn’t require authentication) after google redirects to post-login page, while Quentin redirects to a home page that requires authentication.

I tried modifying my flow to match how Quentin set his up. I started the user on a login page rather than a mobile, and then google redirected them to the post-login page, which automatically redirects to a home page that requires authentication. It didn’t change anything and I was still experiencing the same issues as before.

Just to clarify, the sign up through google is successfull in Xano. I see that a user is created with a populated google-oauth column. However, the token is somehow not being set on the WeWeb side.

Please submit a ticket on support.weweb.io with the link of your project I will give a look :slight_smile:

1 Like

Thanks @Alexis! I created the ticket WeWeb - Support

Hi @Adam, it seems like you encounter the same issue as another user. I think your google API group is still using an old deleted user table. You have to swap the table used in the /continue action on Xano.

1 Like

@Alexis
I never changed the user database table in Xano, it is still the same.
I have however upgraded my Xano account, which created new API base endpoint urls, which I updated in WeWeb for both the regular Xano plugin and the Xano auth plugin.

Just in case it would help, I replace “Get record from User” in the Xano /oauth/google/continue endpoint. But still having the same issue.

I have also contacted Xano support.

What else can I try?

Hi @Adam :wave:

Can you share screenshots of those endpoints in Xano? It may be that they are referencing a different user table for some reason :confused:

From the error message we get, it really seems like the issue is coming from the Xano side of things, specifically, the /oauth/google/continue endpoint:

PS: just sent you a DM with the exact endpoint URL that’s failing so you can check on your side if it matches the endpoint you’re trying to call in Xano or if something changed with the new API base endpoint URLs

@Joyce I PMed you back.

@Alexis How did the other user solve the issue?