-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Feat/add gitee provider #12475
base: main
Are you sure you want to change the base?
Feat/add gitee provider #12475
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
@wushide is attempting to deploy a commit to the authjs Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Just a few minimal changes. Additionally, could you provide documentation about the introduced provider, such as the APIs used or more resources on how to use the provider correctly?
const baseUrl = "https://gitee.com"; | ||
const apiBaseUrl = "https://gitee.com/api/v5"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not necessary to use these two variables, since apiBaseUrl
only adds the path /api/v5
to baseUrl
authorization: { | ||
url: `${baseUrl}/oauth/authorize`, | ||
params: { | ||
scope: "", | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If no additional configuration is needed, there’s no need to use the object. Simply use the API route directly.
token: { | ||
url: `${baseUrl}/oauth/token`, | ||
params: { | ||
grant_type: "authorization_code", | ||
}, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The grant_type
is set to authorization_code
by default, so there’s no need to use the object.
☕️ Reasoning
This will add a login method to Gitee. I have already resolved the type issue, as there was previously a type gap.
🧢 Checklist
🎫 Affected issues
📌 Resources