Using Memberstack OIDC with Auth0

Article author
Duncan Hamra
  • Updated

If you’re using Auth0, you can add Memberstack as a custom social connection.

Step 1 - Memberstack Settings

Follow this tutorial to setup an SSO app integration on the Memberstack dashboard:

📌 Copy your Client ID and Client Secret from this step, you’ll need them in the next step!

Step 2 - Auth0 Settings

From your dashboard in Auth0

  1. navigate to Authentication → Social on the left sidebar
  2. Click “Social” from the submenu and from that screen
  3. Click the “+ Create Connection” button

You’ll be taken to a page called New Social Connection, scroll all the way to the bottom and select “create custom”.

Step 3 - Credentials

On the settings tab of your custom social connection, fill in the following values:

Authorization URL:

Token URL:

Scope:openid email profile

Client ID:<your client id> (from the previous step)

Client Secret:<your client secret> (from the previous step)

Fetch User Profile Script

function fetchUserProfile(accessToken, context, callback) {
      url: '',
      headers: {
        'Authorization': 'Bearer ' + accessToken,
    (err, resp, body) => {
      if (err) {
        return callback(err);
      if (resp.statusCode !== 200) {
        return callback(new Error(body));
      let bodyParsed;
      try {
        bodyParsed = JSON.parse(body);
      } catch (jsonError) {
        return callback(new Error(body));
      const profile = {
        user_id: bodyParsed.sub,
      callback(null, profile);

Step 4 - Testing

Test your connection by clicking “Try Connection”. Use member credentials from the Memberstack account that you created the SSO integration for. If you created a test mode SSO integration, use test mode member credentials!

You’ll see a payload of profile data with your Memberstack info if successful!

Was this article helpful?



Please sign in to leave a comment.