mirror of
https://github.com/casdoor/casdoor.git
synced 2025-07-05 05:50:19 +08:00
Add github oauth.
This commit is contained in:
@ -50,3 +50,11 @@ export function logout() {
|
||||
credentials: "include",
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
||||
export function githubLogin(providerName, code, state, redirectUrl, addition) {
|
||||
console.log(redirectUrl)
|
||||
return fetch(`${Setting.ServerUrl}/api/auth/github?provider=${providerName}&code=${code}&state=${state}&redirect_url=${redirectUrl}&addition=${addition}`, {
|
||||
method: 'GET',
|
||||
credentials: 'include',
|
||||
}).then(res => res.json());
|
||||
}
|
||||
|
Reference in New Issue
Block a user