scientifichackers / flutter_cognito_plugin

An AWS cognito plugin for flutter
GNU Lesser General Public License v3.0
60 stars 28 forks source link

Make the example app work out of the box #21

Open AdrianTudC opened 4 years ago

AdrianTudC commented 4 years ago

How can I contribute to this repo? I detailed the necessary steps to get the example working and I'd like to make a PR.

devxpy commented 4 years ago

What's the contribution about?

AdrianTudC commented 4 years ago

As I stated in the first comment, I just detailed in the README all the steps that have to be taken in order to get your example working as it doesn't work right outside the box. (maybe it used to in the past)

I just wanted to know how I can open a PR so you can review it.

devxpy commented 4 years ago

The example can't work outside the box, because it needs an awsconfiguration.json with sensitive AWS user pool details.

So, if you're willing to give away a user pool a/c for this plugin, I'd be very thankful :)

myappci commented 4 years ago

I don't think the example works out of the box. I configured the example with my cognito configuration. My configuration is in Cognito: How do you want your end users to sign in? email -> Allow email adressed.

When I enter an email as username and a password I always get: Look slike the username is not processed correctly

com.amazonaws.services.cognitoidentityprovider.model.InvalidParameterException: 1 validation error detected: Value at 'username' failed to satisfy constraint: Member must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+ (S

It looks to work when I hard code the username, e.g.

return Cognito.signUo( "email@mydomain.com", passwordController.text, );

myappci commented 4 years ago

I don't think the example works out of the box. I configured the example with my cognito configuration. My configuration is in Cognito: How do you want your end users to sign in? email -> Allow email adressed.

When I enter an email as username and a password I always get: Look slike the username is not processed correctly

com.amazonaws.services.cognitoidentityprovider.model.InvalidParameterException: 1 validation error detected: Value at 'username' failed to satisfy constraint: Member must satisfy regular expression pattern: [\p{L}\p{M}\p{S}\p{N}\p{P}]+ (S

It looks to work when I hard code the username, e.g.

return Cognito.signUo( "email@mydomain.com", passwordController.text, );

I figured it out. TextController and Textbox get's often a space at the end with the user input. So a trim() will make it more stable.

devxpy commented 4 years ago

I will accept a PR that prevents typing spaces into the username field, but not one that trims user input behind the scenes.