oauth2 supports. (#4551)

This commit is contained in:
Garfield Dai
2024-05-21 17:52:41 +08:00
committed by GitHub
parent f32bba6531
commit c873035084
4 changed files with 38 additions and 3 deletions

View File

@@ -159,6 +159,15 @@ export const fetchWebOIDCSSOUrl = async (appCode: string, redirectUrl: string) =
}) as Promise<{ url: string }>
}
export const fetchWebOAuth2SSOUrl = async (appCode: string, redirectUrl: string) => {
return (getAction('get', false))(getUrl('/enterprise/sso/oauth2/login', false, ''), {
params: {
app_code: appCode,
redirect_url: redirectUrl,
},
}) as Promise<{ url: string }>
}
export const fetchAppMeta = async (isInstalledApp: boolean, installedAppId = '') => {
return (getAction('get', isInstalledApp))(getUrl('meta', isInstalledApp, installedAppId)) as Promise<AppMeta>
}

View File

@@ -7,3 +7,7 @@ export const getUserSAMLSSOUrl = () => {
export const getUserOIDCSSOUrl = () => {
return get<{ url: string; state: string }>('/enterprise/sso/oidc/login')
}
export const getUserOAuth2SSOUrl = () => {
return get<{ url: string; state: string }>('/enterprise/sso/oauth2/login')
}