0
votes

We are currently working on an Angular node application which uses WSO2 Api Manager and Identity Server . The current mode of login is done through emails which gets saved as WSO2 Carbon users . We need to allow users to login using their google or facebook accounts using OAuth2. I have implemented the code for fetching access token,refresh token on login through google on click of a button from my app . But How can i link it to save this user as a user in our application's identity server . I found the below link which helps in the process: https://docs.wso2.com/display/IS570/Logging+in+to+an+Application+Using+Google#50629d9a6ddf4769ae2d8953c5a25645 .

Can anyone suggest me whether this one would help ?

I would like to know how the google account user details will be saved as a user in our identity manager ?

Is it possible ? If possible, what all data will i get from google ?

1

1 Answers

3
votes

I assume that you have already done the configurations for the communication between your application and the WSO2 Identity Server according to the description in the question.

From the description, I'm not certain that you have done the configurations to federate the login to Google. Follow the below steps if you already haven't done so.

  1. Generate OAuth client ID from the google developer console.
  2. Configure a federated authenticator in WSO2 IS with google authenticator using the generated client id and secret values.
  3. Add newly created IDP as an option to the first step of your application.

More information can be found in here. From Google, you can get email and default profile attributes of the user. Reference.

Follow the same steps for Facebook login as well. More information available here.

Now the federated login is configured. Now you need to enable JIT provisioning for the configured Identity Providers above to save the user in the Identity Server when the user is logged in with those social login options. More information available in here. You have a few modes to create the user in the Identity Server.

enter image description here