File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ E2E tests require ForgeRock AM connection details. Set these in your environment
7373| ` VITE_FR_AM_COOKIE_NAME ` | AM session cookie name |
7474| ` VITE_FR_OAUTH_PUBLIC_CLIENT ` | OAuth 2.0 client ID |
7575| ` VITE_FR_REALM_PATH ` | AM realm path |
76+ | ` FR_AM_WELLKNOWN_URL ` | AM wellknown URL |
7677
7778## Linting
7879
Original file line number Diff line number Diff line change 5555 const socialProviders = callback
5656 .getProviders ()
5757 .filter ((provider ) => provider .provider !== ' localAuthentication' );
58-
59- if (localAuthentication .length > 0 ) {
60- // Assume that clicking "next" will indicate the user wants to use local authentication
58+ /**
59+ * If local authentication is available and the user hasn't selected a provider yet,
60+ * assume that clicking "next" will indicate the user wants to use local authentication.
61+ * Only set this default when the callback has no value; otherwise this can overwrite a
62+ * social-provider selection during re-renders.
63+ */
64+ if (localAuthentication .length > 0 && ! callback .getInputValue ()) {
6165 callback .setProvider (' localAuthentication' );
6266 }
6367
Original file line number Diff line number Diff line change @@ -332,7 +332,12 @@ export function initialize(): JourneyStore {
332332 // Handle GenericError case
333333 const genericError = result ;
334334 const errorMessage =
335- genericError . message ?? genericError . error ?? interpolate ( 'unknownNetworkError' ) ;
335+ // Journey Client can surface non-2xx responses as a missing `data` payload.
336+ // When that happens on step submission (i.e., we have a `prevStep` context),
337+ // show the standard login failure message rather than a technical error.
338+ genericError . error === 'no_response_data' && context ?. prevStep
339+ ? interpolate ( 'loginFailure' )
340+ : genericError . message ?? genericError . error ?? interpolate ( 'unknownNetworkError' ) ;
336341
337342 await restartJourney ( errorMessage , context ) ;
338343 }
Original file line number Diff line number Diff line change @@ -361,30 +361,6 @@ export const FailureMessagesRenderingStep = {
361361 } ,
362362} ;
363363
364- export const BackToRegisterInteraction = {
365- args : {
366- ...UsernamePassword . args ,
367- journey : {
368- loading : false ,
369- pop : fn ( ) ,
370- push : fn ( ) ,
371- stack : writable ( [ { journey : 'Registration' } , { journey : 'Login' } ] ) ,
372- } ,
373- } ,
374- play : async ( { canvasElement } ) => {
375- const canvas = within ( canvasElement ) ;
376-
377- // This must be derived from `stack[n].journey`. If a regression reintroduces
378- // legacy `tree:` stack entries, this button will fall back to the default label
379- // and will no longer include "register".
380- const backButton = canvas . getByRole ( 'button' , { name : / r e g i s t e r / i } ) ;
381- await expect ( backButton ) . toBeVisible ( ) ;
382-
383- await fireEvent . click ( backButton ) ;
384- await expect ( BackToRegisterInteraction . args . journey . pop ) . toHaveBeenCalled ( ) ;
385- } ,
386- } ;
387-
388364export const ConfirmPasswordInteraction = {
389365 args : {
390366 ...ConfirmPassword . argTypes ,
You can’t perform that action at this time.
0 commit comments