-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(providers): Add Ping Identity provider (#6614)
* adding ping identity provider * converted to typescript and also made requested changes from next-auth team * Update documentation, use OIDCConfig * Apply suggestions from code review * Update ping-id.ts * Create ping-id.svg * Update ping-id.svg * Update ping-id.svg --------- Co-authored-by: Falco Winkler <[email protected]> Co-authored-by: Balázs Orbán <[email protected]>
- Loading branch information
1 parent
208410d
commit ed6b48c
Showing
3 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,6 +71,7 @@ body: | |
- "Osso" | ||
- "Osu" | ||
- "Patreon" | ||
- "Ping Identity" | ||
- "Pipedrive" | ||
- "Reddit" | ||
- "Roblox" | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import type { OIDCConfig, OIDCUserConfig } from "./index.js" | ||
|
||
export interface PingProfile extends Record<string, any> { | ||
iss: string | ||
sub: string | ||
aud: string | ||
iat: number | ||
exp: number | ||
acr: string | ||
amr: [string] | ||
auth_time: number | ||
at_hash: string | ||
sid: string | ||
preferred_username: string | ||
given_name: string | ||
picture: string | ||
updated_at: number | ||
name: string | ||
family_name: string | ||
email: string | ||
env: string | ||
org: string | ||
"p1.region": string | ||
} | ||
|
||
/** | ||
* Add PingId login to your page. | ||
* | ||
* ## Documentation | ||
* | ||
* - [Create App in Ping Identity](https://docs.pingidentity.com/r/en-us/pingone/p1_add_app_worker) | ||
* | ||
* --- | ||
* ## Example | ||
* | ||
* ```ts | ||
* import PingId from "@auth/core/providers/ping-id" | ||
* | ||
* ... | ||
* providers: [ | ||
* PingId({ | ||
* clientId: AUTH_PING_ID_ID, | ||
* clientSecret: AUTH_PING_ID_SECRET, | ||
* issuer: PING_ID_ISSUER | ||
* }) | ||
* ] | ||
* ... | ||
* ``` | ||
* | ||
* ## Help | ||
* | ||
* If you think you found a bug in the default configuration, you can [open an issue](https://authjs.dev/new/provider-issue). | ||
* | ||
* Auth.js strictly adheres to the specification and it cannot take responsibility for any deviation from | ||
* the spec by the provider. You can open an issue, but if the problem is non-compliance with the spec, | ||
* we might not pursue a resolution. You can ask for more help in [Discussions](https://authjs.dev/new/github-discussions). | ||
*/ | ||
|
||
export default function PingId( | ||
options: OIDCUserConfig<PingProfile> | ||
): OIDCConfig<PingProfile> { | ||
return { | ||
id: "ping-id", | ||
name: "Ping Identity", | ||
type: "oidc", | ||
options, | ||
} | ||
} |