vue.jsauth0password-less

Auth0 email magic link `Error: Invalid state` for vue


Checklist

Description

Generated magiclink using passwordlessMethod: 'link' got in my email corrctly but clicking link shows: image

But if I click login button once again it works fine!

Reproduction

  1. Click login button
  2. Provide email
  3. Check mail for the magic link
  4. Click on the link (Shows: Error: Invalid state)
  5. Click again login button (works fine for the 2nd time)

auth0-vue version

2.2.0

Vue version

3.3.4

Which browsers have you tested in?

Chrome

Auth0 GitHub issue

I've searched but found no solution from auth0/docs/spa/vuejs. And found same issue here.


Solution

  • createAuth0Client({
      useCookiesForTransactions: true
    })
    

    useCookiesForTransactions

    Found a solution here: https://github.com/auth0/auth0-spa-js/issues/671#issuecomment-741902973