Our Blog

We are passionate about high quality applications

Jun 09

Social Login Enhancements

We updated the Social Login unit in Rebar to work in multi-tenant factory-site configuration and added capability to log in with LinkedIn and Yahoo!.


Separate units for each social network

The implementation of the social login is now separated into discrete units for each social network, where Social Login acts as a coordinator. The included social networks are specified in the configuration.

Multi-Tenant support

The Social Login unit now fully supports multi-tenant factory-site configuration. The settings have been moved from the .env file to the site configuration. Here is an example of the old settings:

FACEBOOK_APP_ID=<value from App ID field>
FACEBOOK_APP_SECRET=<value from App Secret field>

GOOGLE_CLIENT_ID=<value of Client ID from>
GOOGLE_CLIENT_SECRET=<value of Client secret from>

TWITTER_CONSUMER_KEY=<value of Consumer Key (API Key) from>
TWITTER_CONSUMER_SECRET=<value of Consumer Secret (API Secret) from>

The new settings look like:

const siteInformation = {
  // ...
  configurationAsObject: {
    // ...
    serverData: {
      rb_social_login: {
        // ...
        facebook: {
          app_id: '<value from App ID field>',
          app_secret: '<value from App Secret field>',
        },
        google: {
          client_id: '<value of Client ID from>',
          client_secret: '<value of Client secret from>',
        },
        twitter: {
          consumer_key: '<value of Consumer Key (API Key) from>',
          consumer_secret: '<value of Consumer Secret (API Secret) from>',
        },
      },
    },
  },
}

If you are using single tenant configuration, specify the settings in the /configuration/webapp/siteSettings.js file.