Add Muzl to Your Identity Provider

Add Muzl as a custom OAuth provider to your existing identity provider or authentication library.

What You Need

To add Muzl as a custom OAuth provider, you'll need:

  1. Muzl's OAuth endpoints (below)
  2. Your Client ID and Client Secret from the Developer Dashboard
  3. Your IdP's custom OAuth provider configuration

Muzl OAuth Configuration

Option 1: Use Discovery Endpoint (Recommended)

https://muzl.app/.well-known/openid-configuration

Most modern IdPs support OpenID Connect discovery and can auto-configure using this endpoint.

Option 2: Manual Configuration

If your IdP doesn't support discovery, use these endpoints:

EndpointURL
Authorizationhttps://muzl.app/oauth/authorize
Tokenhttps://muzl.app/oauth/token
UserInfohttps://muzl.app/oauth/userinfo
JWKShttps://muzl.app/oauth/jwks

Credentials

Get your credentials from the Developer Dashboard :

  • Client ID: app_xxxxx
  • Client Secret: secret_xxxxx

Scopes

  • openid — Required for OIDC
  • profile — Optional, includes username

NextAuth.js / Auth.js

Add Muzl as a custom OAuth provider:

// auth.ts or pages/api/auth/[...nextauth].ts
import NextAuth from "next-auth"

export default NextAuth({
  providers: [
    {
      id: "muzl",
      name: "Muzl",
      type: "oauth",
      wellKnown: "https://muzl.app/.well-known/openid-configuration",
      authorization: { params: { scope: "openid profile" } },
      clientId: process.env.MUZL_CLIENT_ID,
      clientSecret: process.env.MUZL_CLIENT_SECRET,
      profile(profile) {
        return {
          id: profile.sub,
          name: profile.name,
        }
      },
    }
  ]
})

Supabase Auth

Add Muzl as a custom OAuth provider in Supabase dashboard:

  1. Go to Authentication > Providers
  2. Enable Custom Provider
  3. Configure:
  • Provider Name: Muzl
  • Authorization URL: https://muzl.app/oauth/authorize
  • Token URL: https://muzl.app/oauth/token
  • UserInfo URL: https://muzl.app/oauth/userinfo
  • Client ID: Your Muzl Client ID
  • Client Secret: Your Muzl Client Secret
  • Scopes: openid profile

Auth0

Add Muzl as a social connection:

  1. Go to Authentication > Social
  2. Click Create Connection
  3. Select Custom OAuth
  4. Configure with Muzl endpoints and credentials
  5. Set Fetch User Profile Script:
function(accessToken, ctx, cb) {
  request.get({
    url: 'https://muzl.app/oauth/userinfo',
    headers: {
      'Authorization': 'Bearer ' + accessToken
    }
  }, function(err, r, body) {
    if (err) return cb(err);
    const user = JSON.parse(body);
    cb(null, {
      user_id: user.sub,
      name: user.name
    });
  });
}

Clerk

Add Muzl as a custom OAuth provider:

  1. Go to User & Authentication > Social Connections
  2. Enable Custom OAuth
  3. Configure with Muzl endpoints and credentials
  4. Set Scopes: openid profile

Passport.js

Use Passport's OAuth2Strategy:

const OAuth2Strategy = require('passport-oauth2');

passport.use('muzl', new OAuth2Strategy({
    authorizationURL: 'https://muzl.app/oauth/authorize',
    tokenURL: 'https://muzl.app/oauth/token',
    clientID: process.env.MUZL_CLIENT_ID,
    clientSecret: process.env.MUZL_CLIENT_SECRET,
    callbackURL: 'https://yourapp.com/auth/muzl/callback',
    scope: ['openid', 'profile']
  },
  async (accessToken, refreshToken, profile, done) => {
    // Get user info
    const response = await fetch('https://muzl.app/oauth/userinfo', {
      headers: { 'Authorization': `Bearer ${accessToken}` }
    });
    const userInfo = await response.json();
    
    return done(null, {
      id: userInfo.sub,
      name: userInfo.name
    });
  }
));

Firebase Auth

Add Muzl as a custom OAuth provider:

  1. Go to Authentication > Sign-in method
  2. Enable Custom Provider
  3. Configure with Muzl endpoints and credentials

AWS Cognito

Add Muzl as an OIDC identity provider:

  1. Go to User Pools > Federation > Identity providers
  2. Click Add identity provider
  3. Select OpenID Connect
  4. Configure:
  • Provider name: Muzl
  • Issuer URL: https://muzl.app
  • Client ID: Your Muzl Client ID
  • Client Secret: Your Muzl Client Secret
  • Authorized scopes: openid profile

Okta

Add Muzl as an external identity provider:

  1. Go to Security > Identity Providers
  2. Click Add Identity Provider
  3. Select OpenID Connect IdP
  4. Configure with Muzl's issuer (https://muzl.app) and credentials

Keycloak

Add Muzl as an identity provider:

  1. Go to Identity Providers
  2. Select OpenID Connect v1.0
  3. Configure with Muzl endpoints and credentials
  4. Set Default Scopes: openid profile

WorkOS

Add Muzl as a custom OAuth provider to WorkOS:

  1. Go to your WorkOS dashboard
  2. Navigate to Authentication
  3. Configure with Muzl's OIDC endpoints

Testing Your Integration

After configuring Muzl:

  1. Try signing in with Muzl in your app
  2. You should be redirected to Muzl for authentication
  3. After authentication, you'll receive a Service ID (in the sub claim)
  4. Store the Service ID in your database

Important:

The sub claim contains the Service ID — this is the unique identifier for the user in your app. You don't need an email; the Service ID is sufficient.

Troubleshooting

"Provider not found" or "Invalid configuration"

  • Check that all URLs are correct (no typos)
  • Verify Client ID and Secret are correct
  • Ensure redirect URI in Muzl dashboard matches your IdP's callback URL

"Invalid redirect_uri"

  • Make sure your IdP's callback URL is registered in Muzl's developer dashboard
  • Check for exact match (including http vs https, trailing slash)

"Scope not supported"

  • Muzl supports openid and profile scopes
  • Some IdPs may require additional scopes — adjust as needed

Need Help?