Closed nclaeys closed 1 year ago
Did you clear your node_modules
before doing the upgrade. Do you have other @aws-amplify
dependencies on your package.json
?
Also what package manager yarn
or npm
? and it do you have this issue on production builds or also on dev?
Hi @nclaeys I was able to identify the problem and the team is preparing a release ASAP. It ended up being a duplicate version of @aws-amplify/core
getting installed with v5.0.16 and v5.0.17 that should come up if you run the command shown on this page of the docs. The library sometimes has issues with Auth functionality if there are multiple core packages installed, in this case it had a core v5.1.0 and a core v5.0.15.
That being said, while the next release should solve this issue, I noticed that you have amazon-cognito-identity-js
installed in your environment which shouldn't be necessary unless you are on a React Native project. I didn't see any evidence of React Native but I could be wrong.
The fix should be out within the next couple of days, if you would like to keep using v5.0.15 until v5.0.18 is released which should fix the problem. I will update this issue when the fix is released.
The release is out if you would like to try v5.0.18 and see if that solves your issue!
@tannerabread Thanks a lot for the fix. Validated it and indeed the issue is solved.
Thanks for the remark about amazon-cognito-identity-js
, we initially used it in the legacy login flow and probably forgot to remove it after migrating. I will look into it.
Glad it fixed the problem! I will close this issue for now but please let me know if you find anything different about amazon-cognito-identity-js
and it was still necessary for your project.
Thank you for opening this issue and bringing this bug to our attention!
@tannerabread we do not really need it, we only use it for typing. We depend on the following classes: CognitoAccessToken,CognitoIdToken, CognitoUser, CognitoUserSession. Our linter is configured to complain if we do not explicitly depend on the package even though it is a transitive dependency.
Oh I see, thanks for the clarity!
@tannerabread It seems that I have the same issue again when upgrading from aws-amplify 5.3.7 -> 5.3.8. In the latest version I do not receive any of the callback url events from the event hub anymore.
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
We use aws-amplify and cognito to perform federated logins. When upgrading from version 5.0.15 to 5.0.16 our login gets stuck. While troubleshooting what happens, we notice that we do not get any events in from the hub. Sample of the code we use:
When reverting back to theold version, we do get the following events: parsingCallbackUrl codeFlow configured signIn cognitoHostedUI
Based on the release notes I do not see an obvious reason why this does not work anymore, can you give me some more insights?
Expected behavior
We should get the signin event such that we can complete the signin and redirect the user to the correct page.
Reproduction steps
install 5.0.16 and change nothing else web app is stuck
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
Auth.configure({ region: 'eu-west-1', userPoolId: 'eu-west-1_xxxxxx', userPoolWebClientId: 'xxxxxxxxxxxxxx', oauth: { domain: auth.dev.dataminded.cloud, scope: ['email', 'openid'], redirectSignIn:
${window.location.origin}/cognito
, redirectSignOut:${window.location.origin}/cognito
, responseType: 'code', }, });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