awsmobile-cli icon indicating copy to clipboard operation
awsmobile-cli copied to clipboard

awsmobile user-signin enable --prompt doesn't allow creation of standard attributes

Open Gribbs opened this issue 6 years ago • 8 comments

I want to create a user-pool with the following command and add some standard attributes such as gender, locale, birthdate:

awsmobile user-signin enable --prompt

However I was not prompted to select any of these standard attributes. These attributes need to be created when the User Pool is created - you can't modify the User Pool to add them later.

Is there a workaround to this? It would be ideal if it was possible to link an existing user pool something like:

awsmobile user-signin enable --user-pool-id ap-southeast-2_USc4aEMXh

Gribbs avatar Feb 28 '18 12:02 Gribbs

I can't even see a way to add this in the mobile hub console? Would be nice if you could select an existing user pool in the mobile hub console and then pull it into the project locally from the cli:

awsmobile pull

Is there any workaround here? I can't really use this project if I can't add these additional attributes to the user pool.

Gribbs avatar Feb 28 '18 12:02 Gribbs

Hi @Gribbs you can use custom attributes. We can add on our backlog this configuration on the cli. Let me know if custom attributes works for you.

elorzafe avatar Mar 01 '18 00:03 elorzafe

Hey @elorzafe thanks for the reply. That could work for me. Are there any advantages/disadvantages you know of using custom attributes in place of the standard attributes?

Gribbs avatar Mar 01 '18 21:03 Gribbs

@Gribbs: Currently Mobile Hub doesn't allow you to create standard attributes when you create the UserPool. We chose some of the most asked for features when designing the User Sign-in feature (and standard attributes didn't make the list at the time). A workaround you will soon have available is the ability to import a UserPool into your Hub project. This way, you can still leverage the advantages Hub gives you with quick backend configuration, without losing the flexibility you get from actually going to Cognito and picking some of the more advanced features.

swaminator avatar Mar 15 '18 06:03 swaminator

That will be awesome @swaminator. I look forward to it!

Gribbs avatar Mar 15 '18 20:03 Gribbs

Is there an estimated timeframe for when you can use a custom userpool? I have been battling this for the last 2 days trying different ways to accomplish this.

markvivanco avatar Mar 24 '18 20:03 markvivanco

@markvivanco: Sorry for the late response, you can now import custom userpools via the Hub console.

swaminator avatar Jun 06 '18 16:06 swaminator

If you import a new user pool via the Hub with a few standard attributes (eg. gender, birthDate), those attributes aren't reflected in the signUp UI and during the actual signUp on the app, you will get a attributes not matched to schema error , whats the work around this??

@swaminator

emzxcv avatar Aug 16 '18 03:08 emzxcv