Error from `loginWithMagicLink` caused by disabled cookies cannot be caught
See original GitHub issue✅ Prerequisites
- Did you perform a cursory search of open issues? Is this bug already reported elsewhere?
- Are you running the latest SDK version?
- Are you reporting to the correct repository (
magic-sdk
)?
🐛 Description
Magic SDK loginWithMagicLink
does not throw a catchable error when the browser has disabled cookies.
🧩 Steps to Reproduce
- Disable all cookies in Firefox Preferences > Privacy & Security > Enhanced Tracking Protection > Custom.
- Load a webpage with CDN Magic SDK and execute the code in the “Code Sample”.
🤔 Expected behavior
loginWithMagicLink
should throw an error that we can catch in the try/catch
block.
😮 Actual behavior
The error cannot be caught in the try/catch
block.
💻 Code Sample
try {
const result = await magic.auth.loginWithMagicLink({
email: '<email>',
showUI: false,
redirectURI: ' <redirectURI>',
})
} catch (error) {
console.log(error);
}
🌎 Environment
Software | Version(s) |
---|---|
magic-sdk |
CDN |
Browser | Firefox 86.0 (64-bit) |
yarn |
|
Operating System | macOS |
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
How to Fix Failed Website Logins Blocked by Disabled ...
You may come across a situation where you are unable to log into a website or get an access denied error and you...
Read more >Turn cookies on or off - Computer - Google Account Help
Cookies save browsing information to make your online experience easier. Discover how to turn cookies on or off while using the Google Chrome...
Read more >Enable cookies in your web browser
If you don't have cookies enabled in your browser, here's how to enable them: Chrome; Edge; Firefox; Safari. Exclamation Point Icon, Important: ...
Read more >iOS Cookie disabled error when signing the documents in ...
When a signer opens a document to sign in Safari browser on an iOS device, it gives the following error: Cookie functionality is...
Read more >Login issues related to browser cookies
Chrome. Open Chrome, select Chrome > Preferences from the top menu bar. Under Privacy and security, select Cookies and other site data. Clear...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I was able to reproduce with this setting. Will update this thread once the issue is resolved!
I checked it out and it is working, thanks!