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

With new version of aws-amplify issue with redirect signInWithRedirect method #14078

Open
3 tasks done
HemangiVekaria opened this issue Dec 13, 2024 · 1 comment
Open
3 tasks done
Assignees
Labels
Auth Related to Auth components/category pending-community-response Issue is pending a response from the author or community. question General question React Native React Native related issue

Comments

@HemangiVekaria
Copy link

Before opening, please confirm:

JavaScript Framework

React Native

Amplify APIs

Authentication

Amplify Version

v6

Amplify Categories

auth

Backend

None

Environment information

@aws-amplify/analytics: ^7.0.58 => 7.0.62
@aws-amplify/react-native: ^1.1.6 => 1.1.6
@aws-amplify/rtn-push-notification: ^1.2.31 => 1.2.31
@aws-amplify/rtn-web-browser: ^1.1.1 => 1.1.1

Describe the bug

I am currently using the latest version of aws-amplify. Previously, I was using the following versions:

aws-amplify: 3.3.1
@aws-amplify/analytics: ^3.3.4

My application includes an option for users to Sign In/Sign Up with Apple, using the custom provider appleid.apple.com. In the earlier version of aws-amplify, I was using the Auth.federatedSignIn method, which worked perfectly.

After updating to the latest version of aws-amplify, the Auth.federatedSignIn method is no longer available. Instead, there is a new method called signInWithRedirect. However, when I implemented it, it didn't work as expected.

When I call this method, a popup appears in the app with the message:
"App wants to use 'amazoncognito.com' to sign in."
It includes two buttons: "Cancel" and "Continue."

If I click "Cancel," the dialog closes.
If I click "Continue," it opens a webpage that displays an error.

This behavior is different from the previous version, where no popup appeared.

I have already configured my aws-config.json file with the following redirect URLs:

redirectSignIn: 'myapp://',
redirectSignOut: 'myapp://'

What can I do to resolve this issue?"

Expected behavior

Login should work

Reproduction steps

From iphone click on apple sign in and it do sign in success from apple and then call signInWithRedirect and it shows as above

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

@github-actions github-actions bot added pending-triage Issue is pending triage pending-maintainer-response Issue is pending a response from the Amplify team. labels Dec 13, 2024
@cwomack cwomack self-assigned this Dec 13, 2024
@cwomack cwomack added React Native React Native related issue Auth Related to Auth components/category labels Dec 13, 2024
@cwomack
Copy link
Member

cwomack commented Dec 13, 2024

Hello, @HemangiVekaria 👋. Can you share a screenshot or log of what the actual error is when you're calling signInWithRedirect? Going from v3 to v6 is a HUGE upgrade with lots of changes, so we may need to get a little more details here on what's happening when you're calling the API's on the frontend. Could you please also share the code where you're calling signInWithRedirect() as well? Thanks, and welcome to v6 of Amplify!

@github-actions github-actions bot removed the pending-maintainer-response Issue is pending a response from the Amplify team. label Dec 13, 2024
@cwomack cwomack added question General question pending-community-response Issue is pending a response from the author or community. and removed pending-triage Issue is pending triage labels Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auth Related to Auth components/category pending-community-response Issue is pending a response from the author or community. question General question React Native React Native related issue
Projects
None yet
Development

No branches or pull requests

2 participants