cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Social login with REST API

Rvanjari
Participant
0 Kudos
773

Hi All,

Working on Social Login Using a REST API from a website , but somehow not able to achieve it , Tried using the accounts.socialLogin REST API.

Need to know what Exact parameters need to passed , is there any other REST API to be called in Sequence ?

Many Thanks,

Ruchita

Accepted Solutions (0)

Answers (1)

Answers (1)

Hi Ruchita,

First of all let me preface that this flow is a complex integration and I would strongly suggest that you work with your SAP CSP representative to engage a technical consultant to back you up on this implementation. A high-level overview for this can be outlined using the following 3-step process:

(i). initiate the login using the socialize.login REST API method, you need to pass certain required parameters including the "x_provider", "client_id", and "redirect_uri", etc. - please review the documentation for the exact list & specification of parameters

(ii). If this is done correctly, the above URL should respond with a 302 redirect to the social provider and you need to have the end-user go through that in a browser to complete the authentication & authorization process directly with the provider. Once done, the provider should redirect the user to the "redirect_uri" specified in step (i).

(iii). Depending on the "response_type" parameter that was passed in step (i). you will need to process either the auth code or auth token to continue the user journey in your client and server application.

As mentioned earlier, this is a complex integration flow and you have to consider many other factors, not just the social login - such as:

  • whether your flow should use a auth code or auth token?
  • how to continue processing the CDC login flow via REST to adhere to the policies & schema set by the site? (i.e. see - Accounts REST API Error Codes and Messages)
  • how to further secure the login to align with any Risk Based Authentication (RBA) factors defined by the site? (i.e. see - Server-Side Implementations of RBA)

This would not be the right forum / channel to discuss these in-detail. So as mentioned at the very start, I would once again strongly encourage you to engage the SAP professional/expert services team to provide you with a technical consulting resource who can help you solution this flow in a way that is best-suited to your business requirements.

Thank you.

Best regards,
Joshua