Change /api/auth/login to POST.

This commit is contained in:
Yang Luo
2021-03-15 00:49:16 +08:00
parent 2a481d6a2e
commit 4a170d1d56
5 changed files with 39 additions and 32 deletions

View File

@ -44,10 +44,11 @@ export function logout() {
}).then(res => res.json());
}
export function authLogin(applicationName, providerName, code, state, redirectUri, method) {
return fetch(`${authConfig.serverUrl}/api/auth/login?application=${applicationName}&provider=${providerName}&code=${code}&state=${state}&redirect_url=${redirectUri}&method=${method}`, {
method: 'GET',
credentials: 'include',
export function authLogin(values) {
return fetch(`${authConfig.serverUrl}/api/auth/login`, {
method: 'POST',
credentials: "include",
body: JSON.stringify(values),
}).then(res => res.json());
}