Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions web/app/signin/components/sso-auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ const SSOAuth: FC<SSOAuthProps> = ({
if (protocol === SSOProtocol.SAML) {
getUserSAMLSSOUrl(invite_token).then((res) => {
router.push(res.url)
}).catch(() => {
toast.error(t('error.ssoFailed', { ns: 'login' }))
}).finally(() => {
setIsLoading(false)
})
Expand All @@ -36,6 +38,8 @@ const SSOAuth: FC<SSOAuthProps> = ({
getUserOIDCSSOUrl(invite_token).then((res) => {
document.cookie = `user-oidc-state=${res.state};Path=/`
router.push(res.url)
}).catch(() => {
toast.error(t('error.ssoFailed', { ns: 'login' }))
}).finally(() => {
setIsLoading(false)
})
Expand All @@ -44,6 +48,8 @@ const SSOAuth: FC<SSOAuthProps> = ({
getUserOAuth2SSOUrl(invite_token).then((res) => {
document.cookie = `user-oauth2-state=${res.state};Path=/`
router.push(res.url)
}).catch(() => {
toast.error(t('error.ssoFailed', { ns: 'login' }))
}).finally(() => {
setIsLoading(false)
})
Expand Down
2 changes: 2 additions & 0 deletions web/i18n/en-US/login.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"error.invalidEmailOrPassword": "Invalid email or password.",
"error.invalidRedirectUrlOrAppCode": "Invalid redirect URL or app code",
"error.invalidSSOProtocol": "Invalid SSO protocol",
"error.ssoFailed": "SSO login failed. Please try again or contact your administrator.",
"error.unknown": "Something went wrong. Please try again.",
"error.nameEmpty": "Name is required",
"error.passwordEmpty": "Password is required",
"error.passwordInvalid": "Password must contain letters and numbers, and the length must be greater than 8",
Expand Down