Coder Social home page Coder Social logo

Comments (5)

SigurdMW avatar SigurdMW commented on June 26, 2024

I'm also using passport-azure-ad and hoping to use this package.

from passport-oauth2-refresh.

DayS avatar DayS commented on June 26, 2024

The same issue is present with passport-openidconnect package, due to the exact same check.

For this one, the oauth2 instance is retrieved just before using it via a method defined in this strategy (not by using inheritance)

So, instead of always relying on a field which may no be present, maybe we should just let the possibility for the user to provide the Oauth2 configuration ?

from passport-oauth2-refresh.

fiznool avatar fiznool commented on June 26, 2024

I'm very open to PRs that fix this behaviour!

from passport-oauth2-refresh.

fiznool avatar fiznool commented on June 26, 2024

As of v2.1.0, there's a new configuration option setRefreshOAuth2 which allows you to use a custom OAuth2 adapter for the refresh token, which should hopefully solve this issue. For passport-azure-ad, assuming you are using the OIDC strategy, you'll need to replicate the configuration as shown in the createOAuth2Instance function.

Please give it a try and let me know if you have any feedback.

from passport-oauth2-refresh.

alexbran8 avatar alexbran8 commented on June 26, 2024

can anyone please share an example with passport-azure-ad? I have two issues which I cannot solve (1. strategy was not registered to refresh a token; 2. the callback from passport-azure-ad, does not add both refresh and access tokens on initial login...)

from passport-oauth2-refresh.

Related Issues (15)

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.