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
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@clerk/localizations': patch
'@clerk/shared': patch
---

Show "Too many requests. Please try again in a bit." for both `too_many_requests` and `signup_rate_limit_exceeded` errors in the prebuilt components. Replace "The External Account was not found." with "Account not found. Please sign up or try signing in to a different account."
5 changes: 5 additions & 0 deletions .changeset/sso-callback-keeps-transfer-error.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@clerk/ui': patch
---

Fix `<SignIn />` showing "The External Account was not found." to new users when the sign-up transfer after an OAuth sign-in fails, for example when a firewall, rate limit or Protect blocks the request. The start screen now keeps the error shown on the SSO callback screen, and a Protect block shows the blocked screen with its reference. The account not found message still appears when transfers are turned off with `transferable={false}`.
69 changes: 69 additions & 0 deletions integration/tests/oauth-flows.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -635,5 +635,74 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withLegalConsent] })(
await u.services.users.deleteIfExists({ email: newUser.email });
}
});

const blockedTransferResponses = [
{
name: 'a non-Clerk HTML response',
response: { status: 429, contentType: 'text/html', body: '<html><body>Blocked</body></html>' },
error: /Unable to complete action at this time/,
},
{
name: 'a Clerk-shaped WAF response',
response: {
status: 429,
contentType: 'application/json',
body: JSON.stringify({
errors: [{ code: 'too_many_requests', message: 'Too many requests. Please try again in a bit.' }],
}),
},
error: /Too many requests\. Please try again in a bit\./,
},
];

for (const { name, response, error } of blockedTransferResponses) {
test(`keeps the transfer error on the start screen when the sign-up transfer is blocked by ${name}`, async ({
page,
context,
}) => {
const providerKeys = await resolveInstanceKeys('oauth-provider');
const providerClient = createClerkClient({ secretKey: providerKeys.sk, publishableKey: providerKeys.pk });
const users = createUserService(withRetry(providerClient));
const newUser = users.createFakeUser(test, { withUsername: true });
await users.createBapiUser(newUser);

const u = await createTestUtils({ app, page, context });

await page.route('**/v1/client/sign_ups*', route => {
const request = route.request();
const isTransfer =
request.method() === 'POST' &&
(new URL(request.url()).searchParams.get('transfer') === 'true' ||
request.postData()?.includes('transfer=true'));
if (!isTransfer) {
return route.continue();
}
return route.fulfill(response);
});

try {
await u.po.signIn.goTo();
await u.page.getByRole('button', { name: 'E2E OAuth Provider' }).click();
await u.page.getByText(/Sign in to .*oauth-provider/).waitFor();

await u.po.signIn.setIdentifier(newUser.email);
await u.po.signIn.continue();
await u.po.signIn.enterTestOtpCode();

const transferError = u.page.getByText(error);
await transferError.waitFor();
await u.page.waitForURL(url => url.pathname === '/sign-in');
await u.po.signIn.waitForMounted();

await expect(transferError).toBeVisible();
await expect(
u.page.getByText(/Account not found\. Please sign up or try signing in to a different account\./),
).toBeHidden();
} finally {
await newUser.deleteIfExists();
await u.services.users.deleteIfExists({ email: newUser.email });
}
});
}
},
);
3 changes: 3 additions & 0 deletions packages/localizations/src/ar-SA.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2084,6 +2084,7 @@ export const arSA: LocalizationResource = {
'لا يمكن تسجيل الحساب بسبب مشاكل تحقق أمنية. الرجاء تحديث الصفحة للمحاولة مرة أخرى أو تواصل معنا للمزيد من المساعدة',
captcha_unavailable:
'التسجيل غير ناجح بسبب فشل التحقق من صحة الروبوت. يُرجى تحديث الصفحة للمحاولة مرة أخرى أو التواصل مع فريق الدعم للحصول على مزيد من المساعدة',
external_account_not_found: undefined,
form_code_incorrect: undefined,
form_email_address_blocked:
'خدمات البريد الإلكتروني المؤقتة غير مدعومة. يرجى استخدام عنوان بريدك الإلكتروني العادي لإنشاء حساب.',
Expand Down Expand Up @@ -2157,9 +2158,11 @@ export const arSA: LocalizationResource = {
protect_check_timed_out: undefined,
protect_check_unsupported_environment: undefined,
session_exists: 'لقد قمت بتسجيل الدخول بالفعل',
signup_rate_limit_exceeded: undefined,
sso_bypass_domain_not_served: undefined,
ticket_expired_code: undefined,
ticket_invalid_code: undefined,
too_many_requests: undefined,
too_many_unverified_identifications: undefined,
web3_missing_identifier: undefined,
web3_signature_request_rejected: 'لقد رفضت طلب التوقيع. يرجى المحاولة مرة أخرى للمتابعة.',
Expand Down
3 changes: 3 additions & 0 deletions packages/localizations/src/be-BY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2094,6 +2094,7 @@ export const beBY: LocalizationResource = {
'Рэгістрацыя не ўдалася з-за памылак бяспекі. Калі ласка, абнавіце старонку, каб паспрабаваць яшчэ раз, або звяжыцеся са службай падтрымкі для атрымання дапамогі.',
captcha_unavailable:
'Рэгістрацыя не ўдалася з-за памылак праверкі ботаў. Калі ласка, абнавіце старонку, каб паспрабаваць яшчэ раз або звяжыцеся са службай падтрымкі для атрымання дапамогі.',
external_account_not_found: undefined,
form_code_incorrect: 'Невядомы код. Пераканайцеся, што вы ўвялі правільны код.',
form_email_address_blocked:
'Часовая пошта не падтрымліваецца. Калі ласка, выкарыстоўвайце свой звычайны адрас электроннай пошты для стварэння акаўнта.',
Expand Down Expand Up @@ -2168,9 +2169,11 @@ export const beBY: LocalizationResource = {
protect_check_timed_out: undefined,
protect_check_unsupported_environment: undefined,
session_exists: 'Вы ўжо ўвайшлі.',
signup_rate_limit_exceeded: undefined,
sso_bypass_domain_not_served: undefined,
ticket_expired_code: undefined,
ticket_invalid_code: undefined,
too_many_requests: undefined,
too_many_unverified_identifications: undefined,
web3_missing_identifier: undefined,
web3_signature_request_rejected: 'Вы адхілілі запыт на подпіс. Калі ласка, паспрабуйце яшчэ раз, каб працягнуць.',
Expand Down
3 changes: 3 additions & 0 deletions packages/localizations/src/bg-BG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2088,6 +2088,7 @@ export const bgBG: LocalizationResource = {
'Типът на файла не се поддържа. Моля, качете изображение във формат JPG, PNG, GIF или WEBP.',
captcha_invalid: undefined,
captcha_unavailable: undefined,
external_account_not_found: undefined,
form_code_incorrect: 'Невалиден код. Моля, опитайте отново.',
form_email_address_blocked:
'Временните имейл услуги не се поддържат. Моля, използвайте вашия обикновен имейл адрес, за да създадете акаунт.',
Expand Down Expand Up @@ -2161,9 +2162,11 @@ export const bgBG: LocalizationResource = {
protect_check_timed_out: undefined,
protect_check_unsupported_environment: undefined,
session_exists: 'Вече сте влезнали.',
signup_rate_limit_exceeded: undefined,
sso_bypass_domain_not_served: undefined,
ticket_expired_code: undefined,
ticket_invalid_code: undefined,
too_many_requests: undefined,
too_many_unverified_identifications: undefined,
web3_missing_identifier: undefined,
web3_signature_request_rejected: 'Отхвърлихте заявката за подпис. Моля, опитайте отново, за да продължите.',
Expand Down
3 changes: 3 additions & 0 deletions packages/localizations/src/bn-IN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2106,6 +2106,7 @@ export const bnIN: LocalizationResource = {
'নিরাপত্তা যাচাইকরণ ব্যর্থ হওয়ার কারণে সাইন আপ ব্যর্থ হয়েছে। আবার চেষ্টা করতে দয়া করে পৃষ্ঠাটি রিফ্রেশ করুন বা আরও সাহায্যের জন্য সাপোর্টের সাথে যোগাযোগ করুন।',
captcha_unavailable:
'বট যাচাইকরণ ব্যর্থ হওয়ার কারণে সাইন আপ ব্যর্থ হয়েছে। আবার চেষ্টা করতে দয়া করে পৃষ্ঠাটি রিফ্রেশ করুন বা আরও সাহায্যের জন্য সাপোর্টের সাথে যোগাযোগ করুন।',
external_account_not_found: undefined,
form_code_incorrect: undefined,
form_email_address_blocked:
'অস্থায়ী ইমেইল পরিষেবাগুলি সমর্থিত নয়। অনুগ্রহ করে অ্যাকাউন্ট তৈরি করতে আপনার নিয়মিত ইমেইল ঠিকানা ব্যবহার করুন।',
Expand Down Expand Up @@ -2186,9 +2187,11 @@ export const bnIN: LocalizationResource = {
protect_check_timed_out: undefined,
protect_check_unsupported_environment: undefined,
session_exists: undefined,
signup_rate_limit_exceeded: undefined,
sso_bypass_domain_not_served: undefined,
ticket_expired_code: undefined,
ticket_invalid_code: undefined,
too_many_requests: undefined,
too_many_unverified_identifications: undefined,
web3_missing_identifier: 'একটি Web3 ওয়ালেট এক্সটেনশন পাওয়া যায়নি। চালিয়ে যেতে দয়া করে একটি ইনস্টল করুন।',
web3_signature_request_rejected:
Expand Down
3 changes: 3 additions & 0 deletions packages/localizations/src/ca-ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2098,6 +2098,7 @@ export const caES: LocalizationResource = {
"El registre no ha estat exitós a causa de validacions de seguretat fallides. Si us plau, actualitza la pàgina per tornar-ho a intentar o posa't en contacte amb el suport per obtenir més assistència.",
captcha_unavailable:
"El registre no ha estat exitós a causa de la validació fallida de bot. Si us plau, actualitza la pàgina per tornar-ho a intentar o posa't en contacte amb el suport per obtenir més assistència.",
external_account_not_found: undefined,
form_code_incorrect: 'El codi introduït no és vàlid. Si us plau, comprova el codi i torna-ho a intentar.',
form_email_address_blocked:
'Els serveis de correu electrònic temporal no estan suportats. Si us plau, utilitzeu la vostra adreça de correu electrònic habitual per crear un compte.',
Expand Down Expand Up @@ -2174,9 +2175,11 @@ export const caES: LocalizationResource = {
protect_check_timed_out: undefined,
protect_check_unsupported_environment: undefined,
session_exists: 'Ja estàs connectat.',
signup_rate_limit_exceeded: undefined,
sso_bypass_domain_not_served: undefined,
ticket_expired_code: undefined,
ticket_invalid_code: undefined,
too_many_requests: undefined,
too_many_unverified_identifications: undefined,
web3_missing_identifier: undefined,
web3_signature_request_rejected: 'Has rebutjat la sol·licitud de signatura. Torna-ho a provar per continuar.',
Expand Down
3 changes: 3 additions & 0 deletions packages/localizations/src/cs-CZ.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2100,6 +2100,7 @@ export const csCZ: LocalizationResource = {
'Registrace neúspěšná kvůli neúspěšným bezpečnostním validacím. Prosím, obnovte stránku a zkuste to znovu nebo kontaktujte podporu.',
captcha_unavailable:
'Registrace nebyla úspěšná kvůli neúspěšné validaci bota. Prosím obnovte stránku a zkuste to znovu, nebo se obraťte na podporu pro další pomoc.',
external_account_not_found: undefined,
form_code_incorrect: 'Kód je nesprávný.',
form_email_address_blocked:
'Dočasné e-mailové služby nejsou podporovány. Pro vytvoření účtu použijte prosím svou běžnou e-mailovou adresu.',
Expand Down Expand Up @@ -2173,9 +2174,11 @@ export const csCZ: LocalizationResource = {
protect_check_timed_out: undefined,
protect_check_unsupported_environment: undefined,
session_exists: 'Jste již přihlášen.',
signup_rate_limit_exceeded: undefined,
sso_bypass_domain_not_served: undefined,
ticket_expired_code: undefined,
ticket_invalid_code: undefined,
too_many_requests: undefined,
too_many_unverified_identifications: undefined,
web3_missing_identifier: 'Rozšíření peněženky Web3 nebylo nalezeno. Pro pokračování prosím nainstalujte jednu.',
web3_signature_request_rejected: 'Odmítli jste žádost o podpis. Chcete-li pokračovat, zkuste to prosím znovu.',
Expand Down
3 changes: 3 additions & 0 deletions packages/localizations/src/da-DK.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2085,6 +2085,7 @@ export const daDK: LocalizationResource = {
'Tilmelding mislykkedes på grund af fejlede sikkerhedsvalideringer. Opdater siden for at prøve igen, eller kontakt support for yderligere assistance.',
captcha_unavailable:
'Tilmelding mislykkedes på grund af fejlet botvalidering. Opdater siden for at prøve igen, eller kontakt support for yderligere assistance.',
external_account_not_found: undefined,
form_code_incorrect: 'Koden er forkert.',
form_email_address_blocked:
'Midlertidige e-mailtjenester understøttes ikke. Brug venligst din almindelige e-mailadresse til at oprette en konto.',
Expand Down Expand Up @@ -2158,9 +2159,11 @@ export const daDK: LocalizationResource = {
protect_check_timed_out: undefined,
protect_check_unsupported_environment: undefined,
session_exists: 'Du er allerede logget ind.',
signup_rate_limit_exceeded: undefined,
sso_bypass_domain_not_served: undefined,
ticket_expired_code: undefined,
ticket_invalid_code: undefined,
too_many_requests: undefined,
too_many_unverified_identifications: undefined,
web3_missing_identifier: undefined,
web3_signature_request_rejected: 'Du har afvist signaturanmodningen. Prøv igen for at fortsætte.',
Expand Down
3 changes: 3 additions & 0 deletions packages/localizations/src/de-DE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2108,6 +2108,7 @@ export const deDE: LocalizationResource = {
'Anmeldung aufgrund fehlgeschlagener Sicherheitsüberprüfung nicht erfolgreich. Bitte versuchen Sie es erneut oder kontaktieren Sie uns für weitere Unterstützung.',
captcha_unavailable:
'Die Anmeldung ist aufgrund einer fehlgeschlagenen Bot-Validierung fehlgeschlagen. Bitte aktualisieren Sie die Seite, um es erneut zu versuchen, oder wenden Sie sich an den Support, um weitere Unterstützung zu erhalten.',
external_account_not_found: undefined,
form_code_incorrect: 'Der eingegebene Code ist falsch. Bitte überprüfen Sie ihn und versuchen Sie es erneut.',
form_email_address_blocked:
'Temporäre E-Mail-Dienste werden nicht unterstützt. Bitte verwenden Sie Ihre reguläre E-Mail-Adresse, um ein Konto zu erstellen.',
Expand Down Expand Up @@ -2191,9 +2192,11 @@ export const deDE: LocalizationResource = {
protect_check_timed_out: undefined,
protect_check_unsupported_environment: undefined,
session_exists: 'Sie sind bereits angemeldet.',
signup_rate_limit_exceeded: undefined,
sso_bypass_domain_not_served: undefined,
ticket_expired_code: undefined,
ticket_invalid_code: undefined,
too_many_requests: undefined,
too_many_unverified_identifications: undefined,
web3_missing_identifier:
'Eine Web3 Wallet-Erweiterung wurde nicht gefunden. Bitte installieren Sie eine, um fortzufahren.',
Expand Down
3 changes: 3 additions & 0 deletions packages/localizations/src/el-GR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2100,6 +2100,7 @@ export const elGR: LocalizationResource = {
'Η εγγραφή απέτυχε λόγω αποτυχημένων ελέγχων ασφαλείας. Ανανεώστε τη σελίδα για να δοκιμάσετε ξανά ή επικοινωνήστε με το κέντρο υποστήριξης για περισσότερη βοήθεια.',
captcha_unavailable:
'Η εγγραφή απέτυχε λόγω αποτυχημένης επαλήθευσης bot. Παρακαλώ ανανεώστε τη σελίδα για να δοκιμάσετε ξανά ή επικοινωνήστε με την υποστήριξη για περισσότερη βοήθεια.',
external_account_not_found: undefined,
form_code_incorrect: 'Ο κωδικός δεν είναι σωστός.',
form_email_address_blocked:
'Οι προσωρινές υπηρεσίες email δεν υποστηρίζονται. Παρακαλώ χρησιμοποιήστε τη συνηθισμένη διεύθυνση email σας για να δημιουργήσετε λογαριασμό.',
Expand Down Expand Up @@ -2182,9 +2183,11 @@ export const elGR: LocalizationResource = {
protect_check_timed_out: undefined,
protect_check_unsupported_environment: undefined,
session_exists: 'Έχετε ήδη συνδεθεί.',
signup_rate_limit_exceeded: undefined,
sso_bypass_domain_not_served: undefined,
ticket_expired_code: undefined,
ticket_invalid_code: undefined,
too_many_requests: undefined,
too_many_unverified_identifications: undefined,
web3_missing_identifier: 'Δεν εντοπίστηκε αναγνωριστικό Web3. Παρακαλώ δοκιμάστε ξανά.',
web3_signature_request_rejected: 'Απορρίψατε το αίτημα υπογραφής. Δοκιμάστε ξανά για να συνεχίσετε.',
Expand Down
3 changes: 3 additions & 0 deletions packages/localizations/src/en-GB.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2089,6 +2089,7 @@ export const enGB: LocalizationResource = {
'Sign up unsuccessful due to failed security validations. Please try using a different browser or disabling browser extensions. If issues persist, contact support for assistance.',
captcha_unavailable:
'Sign up unsuccessful due to failed bot validation. Please refresh the page to try again or reach out to support for more assistance.',
external_account_not_found: undefined,
form_code_incorrect: undefined,
form_email_address_blocked:
'Temporary email services are not supported. Please use your regular email address to create an account.',
Expand Down Expand Up @@ -2165,9 +2166,11 @@ export const enGB: LocalizationResource = {
protect_check_timed_out: undefined,
protect_check_unsupported_environment: undefined,
session_exists: "You're already signed in.",
signup_rate_limit_exceeded: undefined,
sso_bypass_domain_not_served: undefined,
ticket_expired_code: undefined,
ticket_invalid_code: undefined,
too_many_requests: undefined,
too_many_unverified_identifications: undefined,
web3_missing_identifier: undefined,
web3_signature_request_rejected: 'You have rejected the signature request. Please try again to continue.',
Expand Down
Loading
Loading