File tree Expand file tree Collapse file tree 5 files changed +17
-5
lines changed
Expand file tree Collapse file tree 5 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ function PasskeyRecoverAccountWithTokenTheme(props: RecoverAccountWithTokenTheme
4545 throw new Error ( "Should never come here as we don't have back functionality" ) ;
4646 } ;
4747
48+ // TODO: Get the reset options as soon as the page loads and afterwards use the token
49+ // with the options.
50+
4851 const onContinueClick = useCallback ( ( ) => {
4952 // TODO: Add support to make the network call and show the next screen based
5053 // on that result.
@@ -109,7 +112,6 @@ const RecoverAccountThemeInner = (
109112 // errorMessageLabel={showPasskeyConfirmationError ? "WEBAUTHN_PASSKEY_RECOVERABLE_ERROR" : undefined}
110113 isLoading = { false }
111114 onFetchError = { ( ) => { } }
112- resetFactorList = { ( ) => { } }
113115 hideContinueWithoutPasskey
114116 />
115117 ) : props . activeScreen === RecoverAccountScreen . Success ? (
Original file line number Diff line number Diff line change 1313 * under the License.
1414 */
1515
16+ import { redirectToAuth } from "../../../../.." ;
1617import { useTranslation } from "../../../../../translation/translationContext" ;
1718import { Button } from "../../../../emailpassword/components/library" ;
1819
1920export const PasskeyRecoverAccountSuccess = ( ) : JSX . Element => {
2021 const t = useTranslation ( ) ;
2122
23+ const onContinueClick = async ( ) => {
24+ await redirectToAuth ( { show : "signin" } ) ;
25+ } ;
26+
2227 return (
2328 < div data-supertokens = "passkeyRecoverAccountSuccessContainer" >
2429 < div data-supertokens = "header" >
@@ -37,7 +42,7 @@ export const PasskeyRecoverAccountSuccess = (): JSX.Element => {
3742 disabled = { false }
3843 isLoading = { false }
3944 type = "button"
40- onClick = { ( ) => { } }
45+ onClick = { onContinueClick }
4146 label = "WEBAUTHN_EMAIL_CONTINUE_BUTTON"
4247 />
4348 </ div >
Original file line number Diff line number Diff line change @@ -54,7 +54,9 @@ export const PasskeyConfirmation = withOverride(
5454 onClick = { props . onContinueClick }
5555 label = "WEBAUTHN_EMAIL_CONTINUE_BUTTON"
5656 />
57- { ! props . hideContinueWithoutPasskey && < ContinueWithoutPasskey onClick = { props . resetFactorList } /> }
57+ { ! props . hideContinueWithoutPasskey && props . resetFactorList !== undefined && (
58+ < ContinueWithoutPasskey onClick = { props . resetFactorList } />
59+ ) }
5860 </ div >
5961 </ div >
6062 ) ;
Original file line number Diff line number Diff line change @@ -51,7 +51,10 @@ export const SignUpFormInner = withOverride(
5151 }
5252 ) : JSX . Element {
5353 const t = useTranslation ( ) ;
54- const defaultFooter = < ContinueWithoutPasskey onClick = { props . resetFactorList } /> ;
54+ const defaultFooter =
55+ props . resetFactorList !== undefined ? (
56+ < ContinueWithoutPasskey onClick = { props . resetFactorList } />
57+ ) : undefined ;
5558
5659 const onEmailContinueSuccess = useCallback (
5760 ( params : ContinueOnSuccessParams ) => {
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ export type SignUpFormProps = {
168168 recipeImplementation : RecipeImplementation ;
169169 config : NormalisedConfig ;
170170 onSuccess ?: ( result : { createdNewRecipeUser : boolean ; user : User } ) => void ;
171- resetFactorList : ( ) => void ;
171+ resetFactorList ? : ( ) => void ;
172172} ;
173173
174174export type RecoverAccountWithTokenProps = {
You can’t perform that action at this time.
0 commit comments