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

Not getting lamda exceptions for social login #1279

Closed
Sunsiha opened this issue Jan 18, 2022 · 15 comments
Closed

Not getting lamda exceptions for social login #1279

Sunsiha opened this issue Jan 18, 2022 · 15 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 requires-android-fix This issue is the result of an underlying Amplify Android issue that needs to be fixed.

Comments

@Sunsiha
Copy link

Sunsiha commented Jan 18, 2022

When I tried to call social login we are doing few lamda functions. But in flutter am not able to catch the lamba exceptions for social login. When I tried to login with social auth providers getting error like this;

social loginAuthException(message: Sign-in with web UI failed, recoverySuggestion: See attached exception for more details, underlyingException: com.amazonaws.mobileconnectors.cognitoauth.exceptions.AuthServiceException: invalid_request)

Code:

  try {
    var res = await Amplify.Auth.signInWithWebUI(
        provider: authProvider,
        options: const CognitoSignInWithWebUIOptions(
          isPreferPrivateSession: true,
        ));
    print("return response$res");
  } on AuthException catch (e) {
  }

Note: For other cases am getting lamda exceptions in terminal only for social login am not getting. But this lamda errors are getting in web. And we are using same configurations.

They are handling like this;

else if (error.toString().includes("EMAIl_ALREADY_EXISTS")) {
    setErr("Email already exists. Please try again with new one!");
}

Expected Result:
Should be able to get the lamda exceptions.

Flutter details:

Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 18116933e7 (3 months ago) • 2021-10-15 10:46:35 -0700
Engine • revision d3ea636dc5
Tools • Dart 2.14.4

Cognito versions:

amplify_flutter: ^0.2.10
amplify_auth_cognito: ^0.2.10

Added the triggers also;

Screenshot 2022-01-19 at 1 02 57 AM

Screenshot 2022-01-19 at 1 03 24 AM

@dnys1 dnys1 added the auth Issues related to the Auth Category label Jan 18, 2022
@dnys1 dnys1 added this to Pending Triage in Issues Triaging via automation Jan 18, 2022
@dnys1
Copy link
Contributor

dnys1 commented Jan 19, 2022

Hi @Sunsiha - I will try to reproduce. It's possible that this is not supported but I will confirm.

@dnys1 dnys1 self-assigned this Jan 19, 2022
@dnys1 dnys1 added the to-be-reproduced Issues that have not been reproduced yet, but have reproduction steps provided label Jan 19, 2022
@Sunsiha
Copy link
Author

Sunsiha commented Jan 19, 2022

Hi @Sunsiha - I will try to reproduce. It's possible that this is not supported but I will confirm.

You mean this exception itself we won't get?

@dnys1
Copy link
Contributor

dnys1 commented Jan 22, 2022

Hi @Sunsiha - I was able to reproduce the issue, and only when using social sign in (not with hosted UI or regular sign in/sign up). Would you be willing to create an issue in the amplify-android repo with all the information here? They may have more context as to why this is.

@Sunsiha
Copy link
Author

Sunsiha commented Jan 25, 2022

Hi @Sunsiha - I was able to reproduce the issue, and only when using social sign in (not with hosted UI or regular sign in/sign up). Would you be willing to create an issue in the amplify-android repo with all the information here? They may have more context as to why this is.

I need a solution. But the same issue is available in iOS also. So again I have to create new issue in amplify-ios also?

@dnys1
Copy link
Contributor

dnys1 commented Jan 27, 2022

I'm very sorry - as we depend on these libraries internally, I'm not able to resolve the problem without their assistance. I can create the tickets, if you'd prefer, although for their sake it may be easier if you did since you will be able to troubleshoot and respond to their feedback.

@Sunsiha
Copy link
Author

Sunsiha commented Jan 28, 2022

I'm very sorry - as we depend on these libraries internally, I'm not able to resolve the problem without their assistance. I can create the tickets, if you'd prefer, although for their sake it may be easier if you did since you will be able to troubleshoot and respond to their feedback.

Please do create a ticket and let me know

@dnys1
Copy link
Contributor

dnys1 commented Feb 1, 2022

@Sunsiha
Copy link
Author

Sunsiha commented Feb 1, 2022

@Jordan-Nelson Jordan-Nelson added pending-triage This issue is in the backlog of issues to triage bug Something is not working; the issue has reproducible steps and has been reproduced requires-android-fix This issue is the result of an underlying Amplify Android issue that needs to be fixed. requires-ios-fix This issue is the result of an underlying Amplify iOS issue that needs to be fixed. and removed to-be-reproduced Issues that have not been reproduced yet, but have reproduction steps provided pending-triage This issue is in the backlog of issues to triage labels Mar 8, 2022
@Jordan-Nelson Jordan-Nelson moved this from Pending Triage to Bugs in Issues Triaging Mar 8, 2022
@Jordan-Nelson Jordan-Nelson moved this from Bugs to Waiting for iOS\Android fix in Issues Triaging Mar 8, 2022
@Jordan-Nelson Jordan-Nelson changed the title Not getting lamda exceptions for social login. How to catch the lamda exceptions? Not getting lamda exceptions for social login Mar 14, 2022
@Jordan-Nelson Jordan-Nelson removed the requires-ios-fix This issue is the result of an underlying Amplify iOS issue that needs to be fixed. label Apr 19, 2022
@Sunsiha
Copy link
Author

Sunsiha commented Apr 29, 2022

any update?

@Jordan-Nelson
Copy link
Contributor

Hello @Sunsiha - We have recently released a new developer preview version of the Auth category (amplify_flutter v1.0.0-next.0). This new version is a full re-write of the auth category in dart, and it supports Mobile, Desktop, and Web. This issue is addressed in this new version.

You can read more about the developer preview release in the blog post and docs. I will update this issue again once this new version is out of developer preview.

@Jordan-Nelson Jordan-Nelson added the pending-release Issues that have been addressed in main but have not been released label Aug 2, 2022
@Sunsiha
Copy link
Author

Sunsiha commented Aug 8, 2022

Hi @Jordan-Nelson is it supports

Hello @Sunsiha - We have recently released a new developer preview version of the Auth category (amplify_flutter v1.0.0-next.0). This new version is a full re-write of the auth category in dart, and it supports Mobile, Desktop, and Web. This issue is addressed in this new version.

You can read more about the developer preview release in the blog post and docs. I will update this issue again once this new version is out of developer preview.

Is it is supporting web version?

Then why in flutter package it's mentioned only Android and iOS?
Screenshot 2022-08-08 at 8 05 43 PM

@Jordan-Nelson
Copy link
Contributor

Hi @Sunsiha - Pub did not recognize the first dev preview we released as supporting web. We have released a revision which is recognized by Pub as supporting all platforms. You can see that here.

The original version supported all platforms as well, Pub just didn't recognize as supporting all platforms because it wasn't listed in the pubspec. We have updated that in the latest release.

@AsitDixit
Copy link

Hi @Sunsiha - Pub did not recognize the first dev preview we released as supporting web. We have released a revision which is recognized by Pub as supporting all platforms. You can see that here.

The original version supported all platforms as well, Pub just didn't recognize as supporting all platforms because it wasn't listed in the pubspec. We have updated that in the latest release.

When this fix will release for amplify_android . for fluter it was released on feb 24 2022 but no response for android. I'm facing this issue on Android. I have created an issue https://github.com/aws-amplify/amplify-android/issues/1907

@Jordan-Nelson
Copy link
Contributor

Hello @AsitDixit - Are you using the Amplify-Android libraries, or the Amplify-Flutter libraries targeting flutter? I don't have an ETA on a fix for Amplify-Android. That issue would be the correct place to ask for an update for Amplify-Android.

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

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.

Issues Triaging automation moved this from Waiting for iOS\Android fix to Closed Apr 17, 2023
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 requires-android-fix This issue is the result of an underlying Amplify Android issue that needs to be fixed.
Projects
No open projects
Development

No branches or pull requests

4 participants