-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Amplify Auth - Cannot read properties of undefined (reading 'handleAuthResponse') #9917
Comments
Hi @Marcussx, in order to better assist you, can you clarify why you need to manually set the credentials? For manually setting up your own S3 bucket with Amplify, you can follow the docs https://docs.amplify.aws/lib/storage/getting-started/q/platform/js/#manual-setup-import-storage-bucket . Also, are you using |
Hi 👋 Closing this as we have not heard back from you. If you are still experiencing this issue and in need of assistance, please feel free to comment and provide us with any information previously requested by our team members so we can re-open this issue and be better able to assist you. Thank you! |
Hi, this happened me when I was adding Amplify Google oauth and did not press the "Deploy" button on the online Amplify web interface. |
Hi @MarioStipetic Is that correct? If so we appreciate the extra information to unblock others. If not, please let me know and I can reopen this issue |
Before opening, please confirm:
JavaScript Framework
React
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i7-8400H CPU @ 3.00GHz
Memory: 2.87 GB / 15.80 GB
Binaries:
Node: 10.16.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Utilities:
Git: 2.22.0. - C:\Program Files\Git\cmd\git.EXE
IDEs:
VSCode: 1.67.0
Visual Studio: 17.0.32014.148 (Visual Studio Community 2022)
Databases:
SQLite: 3.31.1
Browsers:
Chrome: 101.0.4951.67
Edge: Spartan (44.19041.1266.0), Chromium (101.0.1210.39)
Internet Explorer: 11.0.19041.1566
Describe the bug
Hello everyone,
I'm working on a straight web application using react js, and I'm using Aws Amplify to upload files to S3 Bucket.
Everything works fine.
Now I would like to protect my S3 Bucket so I would not let unathorized access.
I've been following this post: #8632
becuse that solutions fits me too.
But I've faced an issue.
My code is below (The code is almost identical as mentioned in this post - that I left link to, but I will paste it here anyway), so this is my code of
configureAmplify.js
I've installed
amazon-cognito-identity-js
andaws-amplify
libraries.Current versions:
As I wrote in text above, I can't get this running since it looks like
_oAuthHandler
is undefined and I can't invoke methods of undefined as message says:TypeError: Cannot read properties of undefined (reading 'handleAuthResponse').
How couId I possible solve this ?
Any kind of help would be really awesome! :)
Thanks,
Cheers
Expected behavior
I would expect Amplify to works as in post above. Not sure what has changed, that is why I am here.
Reproduction steps
Try to create a Cognito user session without urlListener, or using Auth._oAuthHandler.handleAuthResponse(). It doesn't appear to be possible.
Code Snippet
``
Log output
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
The text was updated successfully, but these errors were encountered: