Xano+oauth Google - 'Login with Provider' action doesn't update value for 'isAuthenticated'

Hi - I’m creating an app and have been able to successfully implement the “Login with Xano” action using the provided Xano Auth Element for login. I’ve also been able to set up Google auth with Xano using the “Login with Provider” action.

When logging in with the Xano Auth element - everything works as expected.

However, when I try logging in with Google - the Xano-Google API is called correctly and a token is returned… but I cannot access any “private” (authenticated users) pages - so I am always redirected back to the login page which is my default page at this time.

Please see this video for a demonstration: Jam

Upon review of the debug logs, I can see that, when the Xano Auth workflow is running, there are three values being updated (user, accessToken, and isAuthenticated).

However, when I use the Xano Provider workflow (+google plugin in Xano) - there is only one value that is being updated: accessToken.

I believe there is a problem in this workflow (and maybe I can solve this by adding an additional variable ‘isAuthenticatedGoogle’ or something) because “isAuthenticated” isn’t being updated and therefore none of my private pages know to allow a Google-Authenticated user to access them. If I do need to create my own ‘isAuthenticatedGoogle’ boolean variable - would I set that value in a workflow on my post-login page that is the redirect uri for the Google auth token?

A video of the backend of the app can be viewed here.

https://jam.dev/c/75a6acbb-6fb3-49ae-ad3e-7424bb1f9ddd

This issue ended up being a bug in Xano where the dbTable variable needed to be refreshed (even though I only ever had one table in my Xano account). I typed in some dummy text and forced the Xano drop-down to search for a dbTable with that name. It didn’t find it (because there was only 1 table - the table that was previously selected)… I then reselected the only table in my Xano account - and published the API workflow - and it worked.

Thanks to @Alexis for the suggestion in this post: Google auth via Xano (through modal) issues - #21 by Alexis for this idea.

1 Like