Okta social media IDP with okta-react

Hello! I’m trying to add a facebook social media login to my react app. I followed these two tutorials:

Seems like I should just be able to set the idps & idpDisplay params in the okta config passed to the Security component but looking through the docs that doesn’t seem supported.

const oktaConfig = {
  issuer: `${process.env.REACT_APP_OKTA_ORG_URL}/oauth2/default`,
  redirect_uri: `${window.location.origin}/implicit/callback`,
  client_id: process.env.REACT_APP_OKTA_CLIENT_ID, 
  idps: [
    {
      type: "FACEBOOK",
      id: "<my_id>",
    },
  ],
  idpDisplay: "PRIMARY",
};

ReactDOM.render(
  <BrowserRouter>
    <Security {...oktaConfig}>
      <App />
    </Security>
  </BrowserRouter>,
  document.getElementById('root')
);

Is there a way to add social media IDPS with okta-react?

I believe there are two ways to integrate social media. One is to use the Sign-In Widget in your app, the other is to customize the hosted sign-in widget. See samples-js-react/custom-login for an example of the 2nd. The Sign-In Widget is configured in src/Login.jsx.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.