Skip to content

Commit 6b577c5

Browse files
committed
fix: turnstile auth
1 parent b3b2332 commit 6b577c5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libs/helpers/turnstile-script.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ export function getTurnstileScript(turnstileSiteKey: string) {
2626
theme: 'dark',
2727
callback: async function(token) {
2828
try {
29+
const authorized = window.ui.authSelectors.authorized().size > 0;
30+
if (authorized) return;
31+
2932
const res = await fetch('/v1/auth/turnstile', {
3033
method: 'POST',
3134
body: JSON.stringify({ token }),

0 commit comments

Comments
 (0)