diff --git a/login-workflow/CHANGELOG.md b/login-workflow/CHANGELOG.md index 5172d069..c0c3c301 100644 --- a/login-workflow/CHANGELOG.md +++ b/login-workflow/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v4.0.2 (Unreleased) + +### Fixed + +- Pass `email` to `validateUserRegistrationRequest` RegistrationUIActions when available ([#529](https://github.com/etn-ccis/blui-react-workflows/issues/529)). + ## v4.0.1 (December 4, 2023) ### Fixed diff --git a/login-workflow/src/screens/VerifyCodeScreen/VerifyCodeScreen.tsx b/login-workflow/src/screens/VerifyCodeScreen/VerifyCodeScreen.tsx index daa2ec20..0f8c90ba 100644 --- a/login-workflow/src/screens/VerifyCodeScreen/VerifyCodeScreen.tsx +++ b/login-workflow/src/screens/VerifyCodeScreen/VerifyCodeScreen.tsx @@ -69,12 +69,12 @@ export const VerifyCodeScreen: React.FC = (props) => { } = props; const handleOnNext = useCallback( - async (code: string) => { + async (code: string, email?: string) => { try { setIsLoading(true); if (actions?.validateUserRegistrationRequest) { // eslint-disable-next-line no-unsafe-optional-chaining - const { codeValid, accountExists } = await actions?.validateUserRegistrationRequest(code); + const { codeValid, accountExists } = await actions?.validateUserRegistrationRequest(code, email); if (accountExists) { updateScreenData({ screenId: 'VerifyCode', values: { code }, isAccountExist: accountExists }); @@ -141,7 +141,7 @@ export const VerifyCodeScreen: React.FC = (props) => { ...WorkflowCardActionsProps, onNext: (data: any): void => { setVerifyCode(data.code); - void handleOnNext(data.code); + void handleOnNext(data.code, emailAddress); WorkflowCardActionsProps?.onNext?.(); }, onPrevious: (data: any): void => {