Skip to content

Commit 009e1da

Browse files
authored
improvement(platform): ui/ux (#1357)
* improvement: branding; auth; chat-deploy * improvement: docs favicon * fix: rolled back verification logic
1 parent 6101493 commit 009e1da

File tree

2 files changed

+2
-33
lines changed

2 files changed

+2
-33
lines changed

apps/sim/app/(auth)/verify/use-verification.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ export function useVerification({
5151
const storedEmail = sessionStorage.getItem('verificationEmail')
5252
if (storedEmail) {
5353
setEmail(storedEmail)
54-
} else {
55-
// If no email is stored, the verification session is invalid
56-
// Clear the verification requirement and redirect to login
57-
document.cookie =
58-
'requiresEmailVerification=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT'
59-
window.location.href = '/login'
60-
return
6154
}
6255

6356
// Check for redirect information
@@ -233,30 +226,6 @@ export function useVerification({
233226
}
234227
}, [otp, email, isLoading, isVerified])
235228

236-
// Clean up verification state on unmount or after 15 minutes
237-
useEffect(() => {
238-
const cleanupTimer = setTimeout(
239-
() => {
240-
// Clear verification state after 15 minutes
241-
if (typeof window !== 'undefined' && !isVerified) {
242-
sessionStorage.removeItem('verificationEmail')
243-
sessionStorage.removeItem('inviteRedirectUrl')
244-
sessionStorage.removeItem('isInviteFlow')
245-
document.cookie =
246-
'requiresEmailVerification=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT'
247-
248-
// Redirect to login
249-
window.location.href = '/login'
250-
}
251-
},
252-
15 * 60 * 1000
253-
) // 15 minutes
254-
255-
return () => {
256-
clearTimeout(cleanupTimer)
257-
}
258-
}, [isVerified])
259-
260229
useEffect(() => {
261230
if (typeof window !== 'undefined') {
262231
if (!isProduction || !hasResendKey) {

apps/sim/app/(auth)/verify/verify-content.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,14 +232,14 @@ function VerificationForm({
232232
</div>
233233
)}
234234

235-
<div className='text-center font-light text-[14px]'>
235+
{/* <div className='text-center font-light text-[14px]'>
236236
<button
237237
onClick={handleCancelVerification}
238238
className='font-medium text-[var(--brand-accent-hex)] underline-offset-4 transition hover:text-[var(--brand-accent-hover-hex)] hover:underline'
239239
>
240240
Back to login
241241
</button>
242-
</div>
242+
</div> */}
243243
</div>
244244
)}
245245
</>

0 commit comments

Comments
 (0)