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:
- Muzl's OAuth endpoints (below)
- Your Client ID and Client Secret from the Developer Dashboard
- Your IdP's custom OAuth provider configuration
Muzl OAuth Configuration
Option 1: Use Discovery Endpoint (Recommended)
https://muzl.app/.well-known/openid-configurationMost 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:
| Endpoint | URL |
|---|---|
| Authorization | https://muzl.app/oauth/authorize |
| Token | https://muzl.app/oauth/token |
| UserInfo | https://muzl.app/oauth/userinfo |
| JWKS | https://muzl.app/oauth/jwks |
Credentials
Get your credentials from the Developer Dashboard :
- Client ID:
app_xxxxx - Client Secret:
secret_xxxxx
Scopes
openid— Required for OIDCprofile— 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:
- Go to Authentication > Providers
- Enable Custom Provider
- 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:
- Go to Authentication > Social
- Click Create Connection
- Select Custom OAuth
- Configure with Muzl endpoints and credentials
- 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:
- Go to User & Authentication > Social Connections
- Enable Custom OAuth
- Configure with Muzl endpoints and credentials
- 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:
- Go to Authentication > Sign-in method
- Enable Custom Provider
- Configure with Muzl endpoints and credentials
AWS Cognito
Add Muzl as an OIDC identity provider:
- Go to User Pools > Federation > Identity providers
- Click Add identity provider
- Select OpenID Connect
- 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:
- Go to Security > Identity Providers
- Click Add Identity Provider
- Select OpenID Connect IdP
- Configure with Muzl's issuer (
https://muzl.app) and credentials
Keycloak
Add Muzl as an identity provider:
- Go to Identity Providers
- Select OpenID Connect v1.0
- Configure with Muzl endpoints and credentials
- Set Default Scopes:
openid profile
WorkOS
Add Muzl as a custom OAuth provider to WorkOS:
- Go to your WorkOS dashboard
- Navigate to Authentication
- Configure with Muzl's OIDC endpoints
Testing Your Integration
After configuring Muzl:
- Try signing in with Muzl in your app
- You should be redirected to Muzl for authentication
- After authentication, you'll receive a Service ID (in the
subclaim) - 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
openidandprofilescopes - Some IdPs may require additional scopes — adjust as needed
Need Help?
- Get credentials: Developer Dashboard
- Quick Start: Simple Implementation Guide
- API Reference: OAuth Endpoints