Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Auth Flow with passwordless login #2393

Closed
dagovalsusa opened this issue Nov 21, 2022 · 5 comments
Closed

Custom Auth Flow with passwordless login #2393

dagovalsusa opened this issue Nov 21, 2022 · 5 comments
Assignees
Labels
auth Issues related to the Auth Category bug Something is not working; the issue has reproducible steps and has been reproduced fixed-in-release-candidate Issues that have been addressed in the current release-candidate branch

Comments

@dagovalsusa
Copy link

    Docs: https://docs.amplify.aws/lib/auth/signin_with_custom_flow/q/platform/flutter/

Originally posted by @Jordan-Nelson in #410 (comment)

Hello everyone,
I've tried to implement Custom Auth Flow with passwordless login using v0.6.10 of amplify_flutter, but when I call Amplify.Auth.signIn('username') the response is "Cannot issue tokens when ChallengeName is SRP_A".
My Cognito is set right because we have used it in production for 2 years, and without amplify_flutter lib, it works.
Further with amplify_flutter v1.0.0-next1 the method Amplify.Auth.signIn('username') works perfectly.
So, I think that in version 0.6.x there is a bug for the CUSTOM_AUTH flow.

Here my amplifyconfiguration, my piece of code is equal to the tutorial example.

const amplifyconfig = ''' { "UserAgent": "aws-amplify-cli/2.0", "Version": "1.0", "auth": { "plugins": { "awsCognitoAuthPlugin": { "IdentityManager": { "Default": {} }, "CognitoUserPool": { "Default": { "PoolId": "us-east-1_xxxxxxx", "AppClientId": "xxxxxxxxxxxxxxxx", "Region": "us-east-1" } }, "Auth": { "Default": { "authenticationFlowType": "CUSTOM_AUTH", "OAuth": { "WebDomain": "xxxxxxx", "AppClientId": "xxxxxxxxxxxxxxxxx", "SignInRedirectURI": "xxx://", "SignOutRedirectURI": "xxx://", "Scopes": [ "phone", "email", "openid", "profile", "aws.cognito.signin.user.admin" ] } } } } } } }''';

@dnys1
Copy link
Contributor

dnys1 commented Nov 21, 2022

Hi @dagovalsusa, sorry you are facing this issue. Can you try the following in v0.6.10?

await Amplify.Auth.signIn(
  username: '<username>',
  options: CognitoSignInOptions(authFlowType: AuthenticationFlowType.customAuth),
);

@dnys1 dnys1 self-assigned this Nov 21, 2022
@dnys1 dnys1 added auth Issues related to the Auth Category pending-community-response Pending response from the issue opener or other community members pending-triage This issue is in the backlog of issues to triage labels Nov 21, 2022
@dnys1
Copy link
Contributor

dnys1 commented Nov 21, 2022

Hi @dagovalsusa, I just saw your comment in #410. Sorry for the repetition. I would recommend using v1.0.0-next.1 if you're able to. That release includes many more fixes besides just this issue.

If you're not able to, can you please share your custom auth trigger code so I can continue diagnosing the problem?

@dagovalsusa
Copy link
Author

Hi, @dnys1 with v1.0.0-next.1 all works correctly.
When is version 1.0.0 scheduled for production release?

@dnys1
Copy link
Contributor

dnys1 commented Nov 22, 2022

I'm glad to hear it. We are planning for a few months out.

@dnys1 dnys1 added pending-release Issues that have been addressed in main but have not been released and removed pending-community-response Pending response from the issue opener or other community members pending-triage This issue is in the backlog of issues to triage labels Nov 22, 2022
@Jordan-Nelson Jordan-Nelson added the pending-triage This issue is in the backlog of issues to triage label Dec 20, 2022
@Jordan-Nelson Jordan-Nelson added bug Something is not working; the issue has reproducible steps and has been reproduced and removed pending-triage This issue is in the backlog of issues to triage labels Jan 23, 2023
@Jordan-Nelson Jordan-Nelson added fixed-in-release-candidate Issues that have been addressed in the current release-candidate branch and removed pending-release Issues that have been addressed in main but have not been released labels Mar 2, 2023
@Jordan-Nelson
Copy link
Member

This issue has been addressed in v1.0.0 of Amplify Flutter, which is now stable. This release also includes web and desktop support for Auth, API, Analytics, and Storage. You can see the list of new features and bug fixes in the release notes, and see more details on how to migrate in the upgrade guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Issues related to the Auth Category bug Something is not working; the issue has reproducible steps and has been reproduced fixed-in-release-candidate Issues that have been addressed in the current release-candidate branch
Projects
None yet
Development

No branches or pull requests

3 participants