Skip to content

Commit 9091bbf

Browse files
Merge pull request #543 from DonOmalVindula/fix/signin-signup-followups
fix(react,nextjs,i18n): embedded sign-in / sign-up follow-ups
2 parents 072c5dc + 58f2eb8 commit 9091bbf

28 files changed

Lines changed: 924 additions & 79 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@asgardeo/react': patch
3+
'@asgardeo/nextjs': patch
4+
'@asgardeo/i18n': patch
5+
---
6+
7+
Fixes for the embedded `<SignIn />` and `<SignUp />` components:
8+
9+
- Social login buttons in the sign-in, sign-up and recovery flows no longer receive internal form-state props (`formValues`, `formErrors`, `touchedFields`, `isFormValid`, `onInputChange`, `inputClassName`), which React reported as unknown attributes on the `<button>` element.
10+
- When the identity server rejects the embedded sign-in because the redirect URI (`afterSignInUrl`) is not registered for the application, the form shows a translated, actionable message naming the URL to register (`errors.signin.redirect.uri.mismatch`) instead of the raw `invalid_callback - callback.not.match` text. The Next.js README documents the redirect URL requirements.
11+
- When the automatic sign-in after an embedded registration cannot be performed, the reason is reported in the browser console as well as the server log.
12+
- `<SignUp />` renders `RICH_TEXT` flow components (for example the terms of service text), which were previously dropped, leaving the submit button jammed against the last field.
13+
- The Next.js `<SignUp />` forwards all remaining props to the underlying form (`showTitle`, `showSubtitle`, `showLogo`, `onComplete`, `onFlowChange`, class names, ...), so for instance `showTitle={false}` now works when a registration flow renders its own heading.
14+
- After a server-side validation error (for example a rejected password), `<SignUp />` now keeps the values the user entered and the submit button stays enabled, so the user can correct the field and resubmit. Previously the form's validation errors were recorded under keys no input could clear, which left the button disabled permanently. Form validation also runs against the value being typed instead of the previous one.

‎packages/i18n/src/models/i18n.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ export interface I18nTranslations {
168168

169169
'errors.heading': string;
170170
'errors.signin.initialization': string;
171+
'errors.signin.redirect.uri.mismatch': string;
171172
'errors.signin.flow.failure': string;
172173
'errors.signin.flow.completion.failure': string;
173174
'errors.signin.flow.passkeys.failure': string;

‎packages/i18n/src/translations/en-US.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ const translations: I18nTranslations = {
170170
'errors.heading': 'Error',
171171
'errors.signin.components.not.available': 'Sign-in form is not available at the moment. Please try again later.',
172172
'errors.signin.initialization': 'An error occurred while initializing. Please try again later.',
173+
'errors.signin.redirect.uri.mismatch':
174+
'The redirect URI "{url}" is not registered for this application. Add it to the application\'s authorized redirect URLs in the console, and to your social login provider if you use app-native social sign-in.',
173175
'errors.signin.flow.failure': 'An error occurred during the sign-in flow. Please try again later.',
174176
'errors.signin.flow.completion.failure':
175177
'An error occurred while completing the sign-in flow. Please try again later.',

‎packages/i18n/src/translations/fr-FR.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ const translations: I18nTranslations = {
163163

164164
'errors.heading': 'Erreur',
165165
'errors.signin.initialization': "Une erreur est survenue lors de l'initialisation. Veuillez réessayer plus tard.",
166+
'errors.signin.redirect.uri.mismatch':
167+
"L'URI de redirection \"{url}\" n'est pas enregistrée pour cette application. Ajoutez-la aux URL de redirection autorisées de l'application dans la console, ainsi qu'à votre fournisseur de connexion sociale si vous utilisez la connexion sociale native.",
166168
'errors.signin.flow.failure': 'Une erreur est survenue lors du flux de connexion. Veuillez réessayer plus tard.',
167169
'errors.signin.flow.completion.failure':
168170
'Une erreur est survenue lors de la finalisation du flux de connexion. Veuillez réessayer plus tard.',

‎packages/i18n/src/translations/hi-IN.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ const translations: I18nTranslations = {
161161

162162
'errors.heading': 'त्रुटि',
163163
'errors.signin.initialization': 'इनिशियलाइज़ेशन में त्रुटि हुई। कृपया बाद में पुनः प्रयास करें।',
164+
'errors.signin.redirect.uri.mismatch':
165+
'रीडायरेक्ट URI "{url}" इस एप्लिकेशन के लिए पंजीकृत नहीं है। इसे कंसोल में एप्लिकेशन के अधिकृत रीडायरेक्ट URL में जोड़ें, और यदि आप ऐप-नेटिव सोशल साइन-इन का उपयोग करते हैं तो अपने सोशल लॉगिन प्रदाता में भी जोड़ें।',
164166
'errors.signin.flow.failure': 'साइन-इन प्रक्रिया में त्रुटि। कृपया बाद में पुनः प्रयास करें।',
165167
'errors.signin.flow.completion.failure': 'साइन-इन प्रक्रिया पूरी करते समय त्रुटि। कृपया बाद में पुनः प्रयास करें।',
166168
'errors.signin.flow.passkeys.failure': 'पासकीज़ के साथ साइन-इन करते समय त्रुटि।',

‎packages/i18n/src/translations/ja-JP.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ const translations: I18nTranslations = {
161161

162162
'errors.heading': 'エラー',
163163
'errors.signin.initialization': '初期化中にエラーが発生しました。後でもう一度お試しください。',
164+
'errors.signin.redirect.uri.mismatch':
165+
'リダイレクト URI「{url}」はこのアプリケーションに登録されていません。コンソールでアプリケーションの承認済みリダイレクト URL に追加してください。アプリネイティブのソーシャルサインインを使用する場合は、ソーシャルログインプロバイダーにも追加してください。',
164166
'errors.signin.flow.failure': 'サインイン処理中にエラーが発生しました。後でもう一度お試しください。',
165167
'errors.signin.flow.completion.failure': 'サインイン処理の完了中にエラーが発生しました。後でもう一度お試しください。',
166168
'errors.signin.flow.passkeys.failure': 'パスキーでのサインイン中にエラーが発生しました。後でもう一度お試しください。',

‎packages/i18n/src/translations/pt-BR.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ const translations: I18nTranslations = {
161161

162162
'errors.heading': 'Erro',
163163
'errors.signin.initialization': 'Ocorreu um erro ao inicializar. Tente novamente mais tarde.',
164+
'errors.signin.redirect.uri.mismatch':
165+
'O URI de redirecionamento "{url}" não está registrado para este aplicativo. Adicione-o às URLs de redirecionamento autorizadas do aplicativo no console e, se usar login social nativo, também ao seu provedor de login social.',
164166
'errors.signin.flow.failure': 'Ocorreu um erro durante o login. Tente novamente mais tarde.',
165167
'errors.signin.flow.completion.failure': 'Ocorreu um erro ao completar o login. Tente novamente mais tarde.',
166168
'errors.signin.flow.passkeys.failure':

‎packages/i18n/src/translations/pt-PT.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ const translations: I18nTranslations = {
161161

162162
'errors.heading': 'Erro',
163163
'errors.signin.initialization': 'Ocorreu um erro ao inicializar. Tente novamente mais tarde.',
164+
'errors.signin.redirect.uri.mismatch':
165+
'O URI de redirecionamento "{url}" não está registado para esta aplicação. Adicione-o aos URLs de redirecionamento autorizados da aplicação na consola e, se utilizar início de sessão social nativo, também ao seu fornecedor de início de sessão social.',
164166
'errors.signin.flow.failure': 'Ocorreu um erro durante o início de sessão. Tente novamente mais tarde.',
165167
'errors.signin.flow.completion.failure':
166168
'Ocorreu um erro ao completar o início de sessão. Tente novamente mais tarde.',

‎packages/i18n/src/translations/si-LK.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,8 @@ const translations: I18nTranslations = {
161161

162162
'errors.heading': 'දෝෂය',
163163
'errors.signin.initialization': 'ආරම්භ කිරීමේදී දෝෂයක් සිදු විය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.',
164+
'errors.signin.redirect.uri.mismatch':
165+
'යළි-යොමු URI "{url}" මෙම යෙදුම සඳහා ලියාපදිංචි කර නොමැත. එය කොන්සෝලයේ යෙදුමේ අනුමත යළි-යොමු URL වලට එක් කරන්න, සහ ඔබ යෙදුම්-ස්වදේශීය සමාජ පිවිසුම භාවිතා කරන්නේ නම් ඔබගේ සමාජ පිවිසුම් සපයන්නාටද එක් කරන්න.',
164166
'errors.signin.flow.failure': 'ලොග් වීමේදී දෝෂයක් සිදු විය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.',
165167
'errors.signin.flow.completion.failure':
166168
'ලොග් වීමේ ක්‍රියාවලිය සම්පූර්ණ කිරීමේදී දෝෂයක් සිදු විය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.',

‎packages/i18n/src/translations/ta-IN.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ const translations: I18nTranslations = {
162162

163163
'errors.heading': 'பிழை',
164164
'errors.signin.initialization': 'தொடக்கத்தில் பிழை ஏற்பட்டது. பின்னர் மீண்டும் முயற்சிக்கவும்.',
165+
'errors.signin.redirect.uri.mismatch':
166+
'திருப்பிவிடும் URI "{url}" இந்த பயன்பாட்டிற்கு பதிவு செய்யப்படவில்லை. இதை கன்சோலில் பயன்பாட்டின் அங்கீகரிக்கப்பட்ட திருப்பிவிடும் URL களில் சேர்க்கவும்; பயன்பாட்டு-சொந்த சமூக உள்நுழைவைப் பயன்படுத்தினால் உங்கள் சமூக உள்நுழைவு வழங்குநரிலும் சேர்க்கவும்.',
165167
'errors.signin.flow.failure': 'உள்நுழைவு செயல்பாட்டின் போது பிழை ஏற்பட்டது. பின்னர் மீண்டும் முயற்சிக்கவும்.',
166168
'errors.signin.flow.completion.failure':
167169
'உள்நுழைவு செயல்பாட்டை முடிக்கும் போது பிழை ஏற்பட்டது. பின்னர் மீண்டும் முயற்சிக்கவும்.',

0 commit comments

Comments
 (0)