fix(login): switch frontend account login to oidc flow
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
import { userHttp } from './http'
|
||||
|
||||
export const loginWithPassword = (username, password) =>
|
||||
userHttp.post('/auth/login', { username, password })
|
||||
|
||||
export const getOidcAuthorizeUrl = (redirectUri) =>
|
||||
userHttp.get('/auth/oidc/url', { params: { redirect_uri: redirectUri } })
|
||||
export const getOidcAuthorizeUrl = (redirectUri, options = {}) =>
|
||||
userHttp.get('/auth/oidc/url', {
|
||||
params: {
|
||||
redirect_uri: redirectUri,
|
||||
login_hint: options.loginHint || undefined,
|
||||
prompt: options.prompt || undefined
|
||||
}
|
||||
})
|
||||
|
||||
export const exchangeOidcCode = (code, redirectUri) =>
|
||||
userHttp.post('/auth/oidc/exchange', { code, redirect_uri: redirectUri })
|
||||
|
||||
Reference in New Issue
Block a user