amplify-swift icon indicating copy to clipboard operation
amplify-swift copied to clipboard

Get AuthUser in the authsignup result

Open cmason9 opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe.

I have noticed that in Android there is an AuthUser object in the AuthSignupResult object so when a new user signs up with their email and password the userId cognito generates gets set when that signup result is returned. On iOS this is not the case and I need to get the userId back when the user successfully completes a signup

Describe the solution you'd like

Add the AuthUser object to the AuthSignUpResult so we can get back the user id

Describe alternatives you've considered

Needed for my work flow

Is the feature request related to any of the existing Amplify categories?

No response

Additional context

No response

cmason9 avatar Jul 11 '22 10:07 cmason9

This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!

github-actions[bot] avatar Jul 11 '22 16:07 github-actions[bot]

Thank you for reaching out to us, we will look into this and will update here with the next steps.

royjit avatar Jul 11 '22 16:07 royjit

Amplify 2.0 has been released which normalizes what values are returned during the Sign Up process. The API will now return UserId created by Cognito as part of the confirmUser next step. Adding the reference to the implementation as well.

public typealias UserId = String

/// SignUp step to be followed.
public enum AuthSignUpStep {

    /// Need to confirm the user
    case confirmUser(
        AuthCodeDeliveryDetails? = nil,
        AdditionalInfo? = nil,
        UserId? = nil)

    /// Sign up is complete
    case done
}

harsh62 avatar Oct 21 '22 16:10 harsh62