Skip to content

feat(provider): add ciam provider #13107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

emadabbasii
Copy link


Summary

This pull request introduces a new, flexible OAuth provider for CIAM (Customer Identity and Access Management) services.

Motivation

Many organizations use custom or self-hosted CIAM solutions for identity management. While many newer systems are OIDC-compliant, a significant number of them still operate as standard OAuth 2.0 servers that require the explicit configuration of endpoints.

This CiamProvider is designed to fill that gap, allowing developers to seamlessly integrate next-auth with any generic OAuth 2.0-based identity provider by manually specifying the required URLs.

Implementation Details

  • Provider Type: oauth
  • Configuration: Requires manual setup of authorizationUrl, tokenUrl, and userinfoUrl.
  • Profile Mapping: The user's id and name are mapped from the sub claim returned by the userinfo endpoint, a standard convention.

Example Usage

import CiamProvider from "next-auth/providers/ciam";

//...
  providers: [
    CiamProvider({
      clientId: process.env.CIAM_CLIENT_ID,
      clientSecret: process.env.CIAM_CLIENT_SECRET,
      authorizationUrl: "https://my-ciam.com/auth",
      tokenUrl: "https://my-ciam.com/token",
      userinfoUrl: "https://my-ciam.com/userinfo",
      issuer: "https://my-ciam.com",
      jwksEndpoint: "https://my-ciam.com/jwks",
    }),
  ]
//...

@emadabbasii emadabbasii requested a review from ThangHuuVu as a code owner July 12, 2025 14:05
Copy link

vercel bot commented Jul 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
auth-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 12, 2025 2:10pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
next-auth-docs ⬜️ Ignored (Inspect) Visit Preview Jul 12, 2025 2:10pm

Copy link

vercel bot commented Jul 12, 2025

@emadabbasii is attempting to deploy a commit to the authjs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Refers to `@auth/core` providers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant