# How to show google auth error message in weweb?

**URL:** <https://community.weweb.io/t/how-to-show-google-auth-error-message-in-weweb/3906>\
**Category:** How do I?\
**Created:** [August 16, 2023, 1:21am UTC](https://community.weweb.io/t/how-to-show-google-auth-error-message-in-weweb/3906 "2023-08-16T01:21:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [August 16, 2023, 1:21am UTC](https://community.weweb.io/t/how-to-show-google-auth-error-message-in-weweb/3906/1 "2023-08-16T01:21:01Z")

</div>

I have installed the Google auth x Xano extension and have managed to successfully login with Google auth to my weweb app. I am using the Xano auth plugin.

The problem: Sometimes, the google authentication fails (Example, there is already a duplicate user). How do I get an error message to show to the user? Usually I either have a Weweb error message or Xano error message that can be shown to the user via a notification, but now user is redirected to a google page so I am unsure how to handle this.

Currently I am unable to show an error message, so user is redirected to login page and they do not know why the google auth authentication does not work as there is no error message.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [August 16, 2023, 11:04pm UTC](https://community.weweb.io/t/how-to-show-google-auth-error-message-in-weweb/3906/2 "2023-08-16T23:04:51Z")

</div>

Hi @raelyn 👋

Could you maybe show us what it looks like in your project and walk us through a couple of errors?

For example, do you see an error in a screen like this or does the user go from clicking on the login button to being redirected back to the login page?

 ![error-oauth](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/5/53d44d63d6b5eac6bf962b022bf265c439b8ed7c.jpeg)

---

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [August 17, 2023, 2:14am UTC](https://community.weweb.io/t/how-to-show-google-auth-error-message-in-weweb/3906/3 "2023-08-17T02:14:54Z")

</div>

Hey @Joyce !

One key error I am facing is that I have set it such that only users with an existing account can log in with Google auth. So users with no account with us won’t be allowed through.

Here’s what happens: The user goes to the Google auth consent screen, picks the email, and then he is redirected straight back to the login page.

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/9/96d68bcb8e9e104d353de6dffc676cf4b1396512.png)

In the Xano end there’s already an error message, but not sure how to relay it to users?

–

Another error I am facing on the sign up page is the problem of duplicate records, being that user who already signed up with the same email on the sign up page using the password method, who later tries to log in / sign up with Google auth, will be unable to do so.

Similarly, they are redirected back to the log in page and they will be wondering why that happened and think that the google auth integration is broken, when it’s actually not…

---

<div class="post-metadata">

**Author:** ![raelyn](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/raelyn/32/2803_2.png) [@raelyn](https://community.weweb.io/u/raelyn)\
**Post date:** [August 21, 2023, 3:35am UTC](https://community.weweb.io/t/how-to-show-google-auth-error-message-in-weweb/3906/4 "2023-08-21T03:35:58Z")

</div>

@Joyce Hey Joyce! Any idea about this? 🤗

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [August 22, 2023, 9:58am UTC](https://community.weweb.io/t/how-to-show-google-auth-error-message-in-weweb/3906/5 "2023-08-22T09:58:23Z")

</div>

Unfortunately nothing precise, no. I don’t have an active project with Google oauth + Xano at the moment. Makes it difficult for me to test and my brain isn’t great at working out abstract use cases 😕

If the error is available in Xano, I _think_ you should be able to access in a workflow and display it on the page.

If you want to send me a DM with a link to the editor and dummy credentials so I can try it, feel free to do so.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [August 31, 2023, 1:39pm UTC](https://community.weweb.io/t/how-to-show-google-auth-error-message-in-weweb/3906/6 "2023-08-31T13:39:56Z")

</div>

Hi @raelyn 👋

I’m a little bit unclear about the flow of the signup and have a few questions for you.

1- You mention users need to be signed up otherwise they won’t be able to sign in with Google later but when I try to sign up, it’s a form that has nothing to do with Google.

Does that mean that you have a system in place that automatically adds the user’s email (the one they sign up with) to the Google Cloud Console to authorize their future log ins?

2- Are you confident everything is setup properly on the Xano / Google side of things?

Just tried to signup to your app but it’s telling me something’s not right with the uris configured in the Google Cloud Console:

 ![CleanShot 2023-08-31 at 15.23.49@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/0f1957996d6b53f68812cb9ab08f6fd088de85d6.png)

More specifically, it would like to redirect me here but the uri is not authorized in Google:

 ![CleanShot 2023-08-31 at 15.24.49@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/0/094220aade2210c3700a2380d8a4db0277a00c42.png)

From what I can tell, that’s the dashboard page where you want to send users after they successfully login:

 ![CleanShot 2023-08-31 at 15.33.30@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/b/bc4ed182aecefb143e31ca508b3b4bec8b8790a2.png)

But in WeWeb, you’re redirecting to a different page:

 ![CleanShot 2023-08-31 at 15.35.45@2x](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/7/7ccc2cdf4829ea732545a59c0a0b770aea5d4c5a.png)

3- Regarding the issue of duplicate records with users who already signed up with the same email using the form, it’s something Q and I have noticed as well during our live streams. You might want to discuss this with the Xano team. I haven’t looked in to it but I’m sure there must be a way to recognize a user who does that is, in fact, a single record.
