Giter Site home page Giter Site logo

Comments (2)

frederikprijck avatar frederikprijck commented on September 18, 2024

Thanks for reaching out. Can you elaborate how the error in the URL relates to the getTokenSilently call?

When you use getTokenSilently, there is no visible URL in the browser that will represent the error or error_description.

The error in the URL is coming from calling loginWithRedirect, are you calling that as well? If so, what error gets populated to Vue's error state as per https://github.com/auth0/auth0-vue/blob/main/EXAMPLES.md#error-handling when you get back with the error in the URL?

Additionally, Login Required isnt an error our SDK generates in this case, it's what we receive from Auth0 as error and error_description.

from auth0-spa-js.

frederikprijck avatar frederikprijck commented on September 18, 2024

I gave this a try and am unable to reproduce this. When configuring Auth0 as you mention, then using the Vue sample app, I get the following when trying to login:

image

As you can see, the error from the URL is properly populated to the error state property and visualized to the user accordingly.
In this case, you should not call getAccessTokenSIlently, because that makes no sense to do when the user is not authenticated in the first place.

However, for the sake or reproducing this I tried, and even that gave me the exact same error, visualized in the exact same way through the error state property.

Note, to be able to test the above I had to configure the playground to allow to request tokens when not logged in.

Closing this, as I can not reproduce this but happy to try and assist where needed. If you need further assistance, can you please try and reproduce using our playground?

git clone [email protected]:auth0-samples/auth0-vue-samples.git
cd 01-Login
npm i
npm run serve

Also be sure to rename 01-Login/auth_config.json.example to 01-Login/auth_config.json and replace the Domain and Client ID.

from auth0-spa-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.