amazon-archives / awsmobile-cli

CLI experience for Frontend developers in the JavaScript ecosystem.
Apache License 2.0
142 stars 35 forks source link

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

Open Gribbs opened 6 years ago

Gribbs commented 6 years ago

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 commented 6 years ago

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.

elorzafe commented 6 years ago

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.

Gribbs commented 6 years ago

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?

swaminator commented 6 years ago

@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.

Gribbs commented 6 years ago

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

markvivanco commented 6 years ago

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.

swaminator commented 6 years ago

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

emzxcv commented 6 years ago

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