In this section · 4 articles

Set up a sign-in provider

Register an app with Google, Apple, GitHub or another provider, give it your Laramin's callback address, then enter its credentials in Social Login and switch the provider on so its button appears on the Sign-In screen.

Applies to
Social Login 2.0 and later
Who can do this
Platform owner, Administrator
Permission
feature.social.provider.edit
Where
Social Login (Platform Administration)
On this page

Each provider needs an app registered in that provider's developer console. The app gives you an ID and a secret; your Laramin gives the app a callback address to send people back to.

Before you start

  • Install and turn on the Social Login add-on. See Upload and install an add-on.
  • You need Edit Provider (feature.social.provider.edit). To add a provider that isn't on the list yet, you also need Create Provider (feature.social.provider.create).
  • Decide whether new people may sign up with a social account. If not, leave Allow public registration off in Configurations › Security › Security Settings: only people who already have an account can then use the buttons. See How social sign-in works.
  • Your Laramin must be reachable at its public https:// address. Most providers refuse other callback addresses.

Find your callback address

Every provider needs this address, where <key> is the provider's Provider Key in lowercase:

Plain text
https://<your Laramin's address>/auth/<key>/callback

Replace the highlighted values with your own.

For example, https://crm.example.com/auth/google/callback or https://crm.example.com/auth/linkedin-openid/callback. It doesn't include /admin. No screen shows the callback address, so build it from your site's address and the provider key.

If your mobile app uses social sign-in, also register https://<your Laramin's address>/auth/<key>/mobile/callback. See Social sign-in from a mobile app.

Steps

1. Register an app with the provider

  1. Open the provider's developer console, for example Google Cloud Console's Credentials page or GitHub's Developer settings.
  2. Create an OAuth app, or an OAuth client of type Web application for Google.
  3. Add your callback address as the app's redirect or callback URL.
  4. Copy the app's client ID and client secret. Keep the secret somewhere safe: some consoles show it only once.

2. Add the provider in your Laramin

Google, Facebook and LinkedIn are already on the list. For any other provider:

  1. In the Platform Administration sidebar, select Social Login. The Social Login Providers list opens.

  2. Select New Social Login Provider.

  3. In Provider Key, choose the provider. Only providers not on the list yet are offered.

    The Create Social Login Providers drawer with the Add a provider note and the Provider Key list open, offering only providers not yet added, with GitLab highlighted.
  4. Select Save.

You see, for example, "GitHub added. Configure its credentials, then switch it on." The provider is added Inactive, with its name and logo filled in.

3. Enter the credentials and switch it on

  1. On the Social Login Providers list, open the provider's actions menu and select Edit.
  2. Optional: change the Display Name. It's the text on the sign-in button. If it's empty, the button shows the Provider Key, such as Linkedin.
  3. Under Credentials, paste the Client ID and Client Secret. Twitter (OAuth 1.0a) calls them Consumer Key and Consumer Secret. Apple needs different values: see Apple below.
  4. Leave Scopes empty to use the provider's standard ones, which ask for the person's name and email address.
  5. Set Status to Active.
  6. Select Save.
The Edit Social Login Providers drawer for Google on the Provider Details tab, with Status set to Active and the Client ID, stored Client Secret, Scopes and iOS and Android Client ID boxes under Credentials.

You see, for example, "Google updated successfully." On the list, Readiness shows Ready, and the button appears on the Sign-In screen. A stored secret is never shown again: to keep it, leave its box empty when you save.

The Social Login Providers list with Google's row showing Status Active, Readiness Ready and a masked Client ID ending in .com, with the Readiness column highlighted.

If a required credential is missing, you see, for example, "Enter the Client Secret before activating this provider."

Tip: The How to Config? tab has step-by-step instructions for Google, Facebook and LinkedIn. For providers you add with New Social Login Provider, the tab is empty.

Apple

Sign in with Apple uses a key file instead of a client secret. In your Apple Developer account:

  1. Create a Services ID for your website, and turn on Sign in with Apple for it, with your callback address as the return URL.
  2. Create a key with Sign in with Apple turned on, and download its .p8 file. Apple lets you download it only once.

Then, on the Apple provider in your Laramin:

FieldWhat to enter
Client IDThe Services ID.
Team IDYour 10-character Team ID, shown at the top right of the developer portal.
Key IDThe 10-character ID of the key you downloaded.
Private Key (.p8)The whole contents of the .p8 file, including the BEGIN and END lines.
iOS Client IDOnly if your iOS app signs in with Apple on the phone: the app's bundle ID.

Google on a mobile app

If your mobile app uses Google's own sign-in on the phone, also fill in iOS Client ID and Android Client ID with the client IDs you created for those apps in Google Cloud Console. Until each is set, sign-ins from that kind of phone are refused.

Choosing between similar providers

  • LinkedIn (OpenID Connect) is for LinkedIn apps created today. LinkedIn, the one already on the list, only works for older LinkedIn apps, because LinkedIn no longer grants new apps the permissions it asks for.
  • X and Twitter (OAuth 2) are for new X apps. Twitter (OAuth 1.0a) is for a Laramin already set up with OAuth 1.0a keys. X shares an email address only if your X app has permission to ask for it, and without one the sign-in is refused.
  • Slack (OpenID Connect) is the newer of the two Slack options.

Careful: Never paste a client secret, private key or .p8 file into a ticket, email or chat. If one leaks, create a new one in the provider's console and replace it here.

What happens next

Sign out, then try the new button on the Sign-In screen. If it doesn't work, see Someone can't sign in with a social account.