|
|
|
@ -6,6 +6,7 @@ import { fetchWebOAuth2SSOUrl, fetchWebOIDCSSOUrl, fetchWebSAMLSSOUrl } from '@/
|
|
|
|
import { useGlobalPublicStore } from '@/context/global-public-context'
|
|
|
|
import { useGlobalPublicStore } from '@/context/global-public-context'
|
|
|
|
import { SSOProtocol } from '@/types/feature'
|
|
|
|
import { SSOProtocol } from '@/types/feature'
|
|
|
|
import Loading from '@/app/components/base/loading'
|
|
|
|
import Loading from '@/app/components/base/loading'
|
|
|
|
|
|
|
|
import AppUnavailable from '@/app/components/base/app-unavailable'
|
|
|
|
|
|
|
|
|
|
|
|
const ExternalMemberSSOAuth = () => {
|
|
|
|
const ExternalMemberSSOAuth = () => {
|
|
|
|
const systemFeatures = useGlobalPublicStore(s => s.systemFeatures)
|
|
|
|
const systemFeatures = useGlobalPublicStore(s => s.systemFeatures)
|
|
|
|
@ -63,6 +64,12 @@ const ExternalMemberSSOAuth = () => {
|
|
|
|
handleSSOLogin()
|
|
|
|
handleSSOLogin()
|
|
|
|
}, [handleSSOLogin])
|
|
|
|
}, [handleSSOLogin])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!systemFeatures.webapp_auth.sso_config.protocol) {
|
|
|
|
|
|
|
|
return <div className="flex h-full items-center justify-center">
|
|
|
|
|
|
|
|
<AppUnavailable code={403} unknownReason='sso protocol is invalid.' />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className="flex h-full items-center justify-center">
|
|
|
|
<div className="flex h-full items-center justify-center">
|
|
|
|
<Loading />
|
|
|
|
<Loading />
|
|
|
|
|