You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeConfirmSignUpOutput={isSignUpComplete: boolean;userId?: string|undefined;nextStep: {signUpStep:
|'DONE'|'CONFIRM_SIGN_UP'|'COMPLETE_AUTO_SIGN_IN',codeDeliveryDetails: {// Not included when signUpStep is 'DONE'destination?: string;deliveryMedium?:
|'EMAIL'|'SMS'|'PHONE'|'UNKNOWN';attributeName?: UserAttributeKey;}};}
Help us reproduce the bug!
Sign up a new user and observe the output of confirmSignUp logged into the browser console.
Code Snippet
// Put your code below this line."use client";import{navigate}from"@/app/utils/actions";import{Authenticator}from"@aws-amplify/ui-react";import{confirmSignUp,signUp}from'aws-amplify/auth';exportdefaultfunctionAuthenticatorWithEmail(){constservices={asynchandleSignUp(formData){let{ username, password, options }=formData;constsignUpResult=awaitsignUp({
username,
password,
options,});returnsignUpResult},asynchandleConfirmSignUp(formdata){let{ username, confirmationCode }=formdata;try{constconfirmSignUpResult=awaitconfirmSignUp({
username,
confirmationCode
});let{ isSignUpComplete, userId, nextStep}=confirmSignUpResult;console.log(userId);console.log(confirmSignUpResult.userId);returnconfirmSignUpResult}catch(error){console.log(error);}},};return(<Authenticatorservices={services}initialState="signUp">{({ signOut, user })=>(<div><p>Welcome,{user?.userId} : {user?.username}</p><buttononClick={signOut}>Signout</button><formaction={navigate}><inputtype="text"name="id"/><button>Completeprofile</button></form></div>)}</Authenticator>);}
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
React
Which UI component?
Authenticator
How is your app built?
Next.js
What browsers are you seeing the problem on?
Chrome, Safari
Which region are you seeing the problem in?
us-east-1
Please describe your bug.
The confirmSignUp function does not return userId. Instead it returns only
What's the expected behaviour?
The output for v6 as described in the auth migration guide:
Help us reproduce the bug!
Sign up a new user and observe the output of
confirmSignUp
logged into the browser console.Code Snippet
Console log output
Additional information and screenshots
My relevant dependencies in
package.json
are:Application is running locally with
npm run dev
.Workstation is MacBook Pro 14-inch 2021 with M1 Pro chip on macOS Sonoma 14.2.1.
No response
The text was updated successfully, but these errors were encountered: