flutter_cognito_plugin icon indicating copy to clipboard operation
flutter_cognito_plugin copied to clipboard

Make the example app work out of the box

Open AdrianTudC opened this issue 5 years ago • 6 comments

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.

AdrianTudC avatar Jan 22 '20 14:01 AdrianTudC

What's the contribution about?

devxpy avatar Jan 22 '20 15:01 devxpy

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.

AdrianTudC avatar Jan 22 '20 15:01 AdrianTudC

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 :)

devxpy avatar Jun 01 '20 18:06 devxpy

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 protected]", passwordController.text, );

myappci avatar Jun 22 '20 16:06 myappci

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 protected]", 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.

myappci avatar Jun 23 '20 17:06 myappci

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

devxpy avatar Jun 23 '20 19:06 devxpy