🛂 (radar) Correctly block banned IP event when signing in with oauth providers
This commit is contained in:
@@ -17,9 +17,10 @@ export const SignInError = ({ error }: Props) => {
|
||||
OAuthAccountNotLinked: t('auth.error.oauthNotLinked'),
|
||||
default: t('auth.error.unknown'),
|
||||
}
|
||||
if (!errors[error]) return null
|
||||
return (
|
||||
<Alert status="error" variant="solid" rounded="md">
|
||||
{errors[error] ?? errors[error]}
|
||||
{errors[error]}
|
||||
</Alert>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -65,6 +65,17 @@ export const SignInForm = ({
|
||||
})()
|
||||
}, [status, router])
|
||||
|
||||
useEffect(() => {
|
||||
if (!router.isReady) return
|
||||
if (router.query.error === 'ip-banned') {
|
||||
showToast({
|
||||
status: 'info',
|
||||
description:
|
||||
'Your account has suspicious activity and is being reviewed by our team. Feel free to contact us.',
|
||||
})
|
||||
}
|
||||
}, [router.isReady, router.query.error, showToast])
|
||||
|
||||
const handleEmailChange = (e: ChangeEvent<HTMLInputElement>) =>
|
||||
setEmailValue(e.target.value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user