Giter Site home page Giter Site logo

Comments (8)

luisrudge avatar luisrudge commented on May 19, 2024 1

@mwillbanks @Enngage I'd love your feedback on #133 🎉

from auth0-spa-js.

luisrudge avatar luisrudge commented on May 19, 2024

I agree that will be super useful. Do you want to send a PR with that? If you can't, I'll add our near term backlog to make sure we work on this.

from auth0-spa-js.

Enngage avatar Enngage commented on May 19, 2024

Same here, I feel the 30s timeout is way too low :( I would really liked there to be a way to configure custom timeout + way to close popup on any error.

from auth0-spa-js.

Enngage avatar Enngage commented on May 19, 2024

@luisrudge awesome, thank you!

Could you possibly share the reasoning behind the default 30sec timeout? Many users fail to fill in their credentials in such short time.

I like that you can close the popup from within the error using error.popup.close();, but would it be possible to get an instance of popup when you call auth0.loginWithPopup (and similar methods) so that we can potentially have more control and close popup whenever we want?

from auth0-spa-js.

luisrudge avatar luisrudge commented on May 19, 2024

@Enngage I'm not sure where you saw a 30s default. I think we always used a 60s timeout.
It's not possible to return the popup in the loginWithPopup method because when the method finishes, the authentication already happened. I think it's better if we manage the lifecycle of the popup.

from auth0-spa-js.

mwillbanks avatar mwillbanks commented on May 19, 2024

You can fetch the pop-up today it's a hack but works with most browsers: const win = window.open('', 'auth0:authorize:popup')

from auth0-spa-js.

Enngage avatar Enngage commented on May 19, 2024

@luisrudge I thought I saw 30 seconds somewhere, but maybe I confused it with something else :-) Either way the PR looks good and would definitely help accomplish both my issues I have currently with this package. Thank you!

from auth0-spa-js.

luisrudge avatar luisrudge commented on May 19, 2024

You can fetch the pop-up today it's a hack but works with most browsers: const win = window.open('', 'auth0:authorize:popup')

Yes, I can get the reference of the popup in the code, but there's no API that would expose the popup before the code actually runs. For example, how would you get a reference to the popup with this code: await auth0Client.getTokenWithPopup(params);

We could change it to be something like this:

const popup = await auth0Client.getTokenWithPopup(params);
const token = await popup.getToken();

But then we'd be penalizing the most used scenario for a niche use case.

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.