@@ -64,52 +64,55 @@ export const SignUpFormInner = withOverride(
6464 ) ;
6565
6666 return (
67- < FormBase
68- clearError = { props . clearError }
69- onFetchError = { props . onFetchError }
70- onError = { props . onError }
71- formFields = { [
72- {
73- id : "email" ,
74- label : "" ,
75- labelComponent : (
76- < div data-supertokens = "formLabelWithLinkWrapper" >
77- < Label value = { "WEBAUTHN_SIGN_UP_LABEL" } data-supertokens = "emailInputLabel" />
78- < a
79- onClick = { ( ) => props . setActiveScreen ( SignUpScreen . RecoverAccount ) }
80- data-supertokens = "link linkButton formLabelLinkBtn recoverAccountTrigger" >
81- { t ( "WEBAUTHN_RECOVER_ACCOUNT_LABEL" ) }
82- </ a >
83- </ div >
84- ) ,
85- optional : false ,
86- autofocus : true ,
87- placeholder : "" ,
88- autoComplete : "email" ,
89- // We are using the default validator that allows any string
90- validate : defaultEmailValidator ,
91- } ,
92- ] }
93- buttonLabel = { "WEBAUTHN_EMAIL_CONTINUE_BUTTON" }
94- onSuccess = { onEmailContinueSuccess }
95- callAPI = { async ( formFields ) => {
96- const email = formFields . find ( ( field ) => field . id === "email" ) ?. value ;
97- if ( email === undefined ) {
98- throw new STGeneralError ( "GENERAL_ERROR_EMAIL_UNDEFINED" ) ;
99- }
100-
101- // We do not want the form to make the API call since we have
102- // an intermediary step here so we will just mock an OK status
103- // to render the next step.
104- return {
105- status : "OK" ,
106- email,
107- } ;
108- } }
109- validateOnBlur = { false }
110- showLabels = { true }
111- footer = { props . footer || defaultFooter }
112- />
67+ < div data-supertokens = "signUpFormInnerContainer" >
68+ < div data-supertokens = "cautionMessage" > { t ( "WEBAUTHN_SIGN_UP_CAUTION_MESSAGE_LABEL" ) } </ div >
69+ < FormBase
70+ clearError = { props . clearError }
71+ onFetchError = { props . onFetchError }
72+ onError = { props . onError }
73+ formFields = { [
74+ {
75+ id : "email" ,
76+ label : "" ,
77+ labelComponent : (
78+ < div data-supertokens = "formLabelWithLinkWrapper" >
79+ < Label value = { "WEBAUTHN_SIGN_UP_LABEL" } data-supertokens = "emailInputLabel" />
80+ < a
81+ onClick = { ( ) => props . setActiveScreen ( SignUpScreen . RecoverAccount ) }
82+ data-supertokens = "link linkButton formLabelLinkBtn recoverAccountTrigger" >
83+ { t ( "WEBAUTHN_RECOVER_ACCOUNT_LABEL" ) }
84+ </ a >
85+ </ div >
86+ ) ,
87+ optional : false ,
88+ autofocus : true ,
89+ placeholder : "" ,
90+ autoComplete : "email" ,
91+ // We are using the default validator that allows any string
92+ validate : defaultEmailValidator ,
93+ } ,
94+ ] }
95+ buttonLabel = { "WEBAUTHN_EMAIL_CONTINUE_BUTTON" }
96+ onSuccess = { onEmailContinueSuccess }
97+ callAPI = { async ( formFields ) => {
98+ const email = formFields . find ( ( field ) => field . id === "email" ) ?. value ;
99+ if ( email === undefined ) {
100+ throw new STGeneralError ( "GENERAL_ERROR_EMAIL_UNDEFINED" ) ;
101+ }
102+
103+ // We do not want the form to make the API call since we have
104+ // an intermediary step here so we will just mock an OK status
105+ // to render the next step.
106+ return {
107+ status : "OK" ,
108+ email,
109+ } ;
110+ } }
111+ validateOnBlur = { false }
112+ showLabels = { true }
113+ footer = { props . footer || defaultFooter }
114+ />
115+ </ div >
113116 ) ;
114117 }
115118) ;
0 commit comments