question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

  1. Disable all cookies in Firefox Preferences > Privacy & Security > Enhanced Tracking Protection > Custom.
  2. 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.

Screen Shot 2021-03-03 at 19 00 37

💻 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
smithkicommented, Mar 3, 2021

Try it with “All cookies” option: Screen Shot 2021-03-03 at 20 28 52

I was able to reproduce with this setting. Will update this thread once the issue is resolved!

0reactions
ValentaTomascommented, Mar 22, 2021

I checked it out and it is working, thanks!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found