Google Sign in

I am trying to sign up/sign in user through his gmail id in an application but I am getting some authorization error. Till now i have generated client id and client secret and using the google sign in forge component. Can anybody help me in this and also tell me steps to use this component as there is no documentation. This is the error : 

Solution

Hi Harsh,

You are using  Google Sign in   component. In Overview section of this component there is link of an article Federated Single Sign-On that help you to know flow of this component.

As I know  at google developer console where you generated Client Id and Client secret. Besides these you also need to provide  Authorized Javascript Origins and Authorized Redirects URIs (Only Use in Traditional Web , No need to configure it in Reactive and Mobile). 

Note- Leave Authorized redirects URIs blanks in your case. You can see it also in article 


So, You are requesting it from your browser but javascript origins still not configured (or not correct URL) at google developer console project. That's  reason of mismatch of Url.

 

You can also use     Google Login Reactive . it also have simple logic for Google authentication.

Thank you , Hope this help.


Heyy Rahul, Thank u so much u solved my problem. I want to ask one more thing please. Can u please tell me how to logout the user in this component. 


I think , It's not about component, because google only authenticate user and it's upon what's scope you want to ask from google. Suppose you take Name, Email, Birthdate of users as response, then you need to create or update user  (save user data in System User Database ) by using google response  in your User database. Now you created user in your web app and you have user id in your hand. After doing this   use Login   and Logout server action for logged in and logged out from web application.

Okay thanxx Rahul , now I got the concept. Thank u and sorry for late reply.

Hi Harsh,

The error message indicates where the problem is. Besides the client id and client secret you also have to register the redirect URI in the google API console.

You can do it by accessing the console ->Credentials->Authorized redirect URIs

After adding the URL the redirect should work.

IG

Champion

Hi Harsh,
You can refer to this training, which helps to integrate Google Login in our Outsystems Application. You can find more details for it in the Lesson materials.

Solution

Hi Harsh,

You are using  Google Sign in   component. In Overview section of this component there is link of an article Federated Single Sign-On that help you to know flow of this component.

As I know  at google developer console where you generated Client Id and Client secret. Besides these you also need to provide  Authorized Javascript Origins and Authorized Redirects URIs (Only Use in Traditional Web , No need to configure it in Reactive and Mobile). 

Note- Leave Authorized redirects URIs blanks in your case. You can see it also in article 


So, You are requesting it from your browser but javascript origins still not configured (or not correct URL) at google developer console project. That's  reason of mismatch of Url.

 

You can also use     Google Login Reactive . it also have simple logic for Google authentication.

Thank you , Hope this help.


Heyy Rahul, Thank u so much u solved my problem. I want to ask one more thing please. Can u please tell me how to logout the user in this component. 


I think , It's not about component, because google only authenticate user and it's upon what's scope you want to ask from google. Suppose you take Name, Email, Birthdate of users as response, then you need to create or update user  (save user data in System User Database ) by using google response  in your User database. Now you created user in your web app and you have user id in your hand. After doing this   use Login   and Logout server action for logged in and logged out from web application.

Okay thanxx Rahul , now I got the concept. Thank u and sorry for late reply.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.