oauth2 supports. (#4551)
This commit is contained in:
parent
f32bba6531
commit
c873035084
4 changed files with 38 additions and 3 deletions
|
|
@ -6,7 +6,7 @@ import React, { useEffect, useState } from 'react'
|
|||
import { useTranslation } from 'react-i18next'
|
||||
import Toast from '@/app/components/base/toast'
|
||||
import Button from '@/app/components/base/button'
|
||||
import { fetchSystemFeatures, fetchWebOIDCSSOUrl, fetchWebSAMLSSOUrl } from '@/service/share'
|
||||
import { fetchSystemFeatures, fetchWebOAuth2SSOUrl, fetchWebOIDCSSOUrl, fetchWebSAMLSSOUrl } from '@/service/share'
|
||||
import LogoSite from '@/app/components/base/logo/logo-site'
|
||||
import { setAccessToken } from '@/app/components/share/utils'
|
||||
|
||||
|
|
@ -90,6 +90,13 @@ const WebSSOForm: FC = () => {
|
|||
setIsLoading(false)
|
||||
})
|
||||
}
|
||||
else if (protocal === 'oauth2') {
|
||||
fetchWebOAuth2SSOUrl(appCode, redirectUrl).then((res) => {
|
||||
router.push(res.url)
|
||||
}).finally(() => {
|
||||
setIsLoading(false)
|
||||
})
|
||||
}
|
||||
else {
|
||||
Toast.notify({
|
||||
type: 'error',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue