Clerk as an OAuth Provider. #9316
mchennupati
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
Hey @mchennupati is the code you provided working? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Goals
Non-Goals
Background
The current alternatives is to create your own configuration file in this form:
https://github.com/nextauthjs/next-auth/tree/v4/packages/next-auth/src/providers
The clerk oauth2 can be created using this:
https://api.clerk.com/v1/oauth_applications
And it is in this form:
{
"object":"oauth_application",
"id":"xxxxxx",
"instance_id":"ins_xxxx",
"name":"nextauth-clerk",
"client_id":"xxxxx",
"client_secret":"xxxxxx",
"public":false,
"scopes":"email profile",
"callback_url":"https://yourapp/api/auth",
"authorize_url":"https://clerk.yourapp.com/oauth/authorize",
"token_fetch_url":"https://clerk.yourapp.com/oauth/token",
"user_info_url":"https://clerk.yourapp.com/oauth/userinfo",
"created_at":1701767138671,
"updated_at":1701767138671
}
Proposal
Add a new clerk.ts file to providers here: https://github.com/nextauthjs/next-auth/tree/v4/packages/next-auth/src/providers
Beta Was this translation helpful? Give feedback.
All reactions