Aws-sdk-android: Pass clientMetaData to Cognito Triggers

Created on 28 Feb 2020  路  11Comments  路  Source: aws-amplify/aws-sdk-android

Add clientMetaData into the Auth apis.

Similar ticket in iOS - https://github.com/aws-amplify/aws-sdk-ios/issues/2299

AWSMobileClient Feature Request

All 11 comments

Hi @royjit,

as the iOS version seems merged, is it possible to get an update about the Android version ? Not passing metadata is blocking for implementing properly Custom Auth Workflows.

Thanks,

Hi,

any update @royjit ?

The iOS version was released, and we really need this on the Android version as well.

Thanks,

+1 this is also something our team would really need soon on the Android side to match what we have on our iOS app.

This feature request was put in almost a week ago.. how far are we from it being implemented?

Hi @royjit,

As in the previous comments, our team need to add this feature to the Android project, since it is already implemented in iOS.

We have created a new issue #2547 on the iOS repository in order to add the clientMetaData parameter to the resendSignUpCode call, it is possible to take it into account for the android version?

Thanks

We developed the web using amplify.

However, because the clientMetadata cannot be added in the signUp call in Android, we can no longer proceed with Android app development.

I'm so angry. All code we have developed regarding user authentication should be deleted.

I can't trust aws anymore.

Heya @hama0511 -- this functionality was added to our signup APIs in https://github.com/aws-amplify/aws-sdk-android/pull/1547 but this issue wasn't properly closed out. Are you encountering an issue trying to pass metadata to this method?

Hi @hama0511! Sorry you're hitting a snag. As @jpignata mentions, I think we do have support for this. We'd like to work with you to resolve your problems, if we can. You can also come chat with us our Discord server, if that's easier: https://discord.gg/amplify. We're in #android-help.

Sorry! I found it AWSMobileClient.
But not Amplify..
should I use AWSMobileClient instead amplify?

@hama0511 Yes. For right now, I recommend to use AWSMobileClient. You can access it via the escape hatch of the Amplify Auth category.

val authPlugin = Amplify.Auth.getPlugin("awsCognitoAuthPlugin")
val mobileClient = authPlugin.escapeHatch as AWSMobileClient?

From there, you can pass a map of client metadata to:

  1. signUp
  2. confirmSignUp
  3. signIn
  4. confirmSignIn
  5. resendSignUp
  6. forgotUserPassword
  7. confirmForgotPassword
  8. updateUserAttributes
  9. verifyUserAttribute
Was this page helpful?
0 / 5 - 0 ratings