Comments (12)
Thanks for the report, @mayankgupta0510 - I'm not aware of an existing issue that matches what you describe, but we'll take a look and see if we can reproduce.
from okta-oidc-js.
Internal ref: OKTA-341568
from okta-oidc-js.
Sorry i think , i didnt explain the problem properly, so let me explain actual issue here -> i am using oidc-middleware -> version 4.0.1 and my code snippet is
const oidc = new ExpressOIDC({
issuer: ias_serv.credentials.url,
client_id: ias_serv.credentials.clientId,
client_secret: ias_serv.credentials.Secret,
appBaseUrl: domainURL,
scope: "openid",
loginRedirectUri: domainURL + "/login/callback",
response_type: "code",
response_mode: "form_post",
});
app.use(
session({
secret: "dummy-cookie-secret",
resave: true,
saveUninitialized: false,
})
);
app.use(oidc.router);
app.use(function (req: any, res: any, next: Function) {
if (!req.userContext && req.url == "/") {
console.log("login");
res.redirect("/login");
return;
} else {
app.use("/", routes);
}
next();
});
app.get("/login", oidc.ensureAuthenticated());
app.get("/login/callback", (req, res, next) => {
res.redirect("/home");
next();
});
const port = process.env.PORT || 3000;
oidc.on("ready", () => {
app.listen(port, () => {
console.log("We are live on " + port);
});
});
after successfully authentication it redirects to /login/callback and it gives an error stating "done is not a function" from oidcUtils.bootstrapPassportStrategy line 91.
TypeError: done is not a function
at OpenIDConnectStrategy._verify (/Users/i077549/Documents/GitHub/CP-Home/node_modules/oidc-middleware/src/oidcUtil.js:91:9)
at /Users/i077549/Documents/GitHub/CP-Home/node_modules/oidc-middleware/node_modules/openid-client/lib/passport_strategy.js:172:10
at processTicksAndRejections (internal/process/task_queues.js:97:5)
from okta-oidc-js.
i believe there is already PR raised for this issue #372,
to update oidcUtil to allow a callback without userinfo
Currently my IDP only supports scope "openid" so incase if we don't have userinfo then it gives above error.
can you please confirm whether this fix is valid or not ?
from okta-oidc-js.
HI @mayankgupta0510 , we have this on our board to look at next week, including reviewing the PR above. Are you blocked while we investigate or have you been able to workaround by using the code in the PR? Thanks!
from okta-oidc-js.
Hi Robert,
Actually I am totally block with this issue, I am able to use the above PR code but I cannot use that for my production code.
Please can you take up this on priority, we have our Dev close on 4th November.
Thanks,
Mayank
from okta-oidc-js.
Hello Team, Robert,
any updates on this please?
from okta-oidc-js.
@mayankgupta0510 I am reviewing the code changes. So far they look good and we should be able to get them integrated. If I understand the issue properly, it is that your IDP does not support the "profile" scope which would normally provide the userinfo? And without the userinfo object, the number of parameters is changed, leading to this error.
from okta-oidc-js.
"it is that your IDP does not support the "profile" scope which would normally provide the userinfo? And without the userinfo object, the number of parameters is changed, leading to this error."
Mayank >> Yes that's exactly the problem.
could you please let me know in which release version or beta version this fix will be available since we are waiting for this fix for our release.
from okta-oidc-js.
Hello,
can you please let me know when will you release this fix?
from okta-oidc-js.
hello @mayankgupta0510 - I am getting #372 ready to merge - it should be good to go in the next few days
the release date have not been set yet but it is likely to happen soon
from okta-oidc-js.
@mayankgupta0510 - FYI, fix has been released in v4.0.2
from okta-oidc-js.
Related Issues (20)
- Security vulnerabilities in jwt-verifier dependencies HOT 2
- @okta/jwt-verifier > njwt > [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() HOT 1
- ID token refresh Feature Request/Question HOT 1
- decode function ? HOT 2
- a way to verify using a pem ? HOT 1
- Typescript Options interface missing jwskUri property HOT 2
- Security vulnerability in [email protected] HOT 2
- okta-oidc-js error in documentation on how to work with Proxies HOT 2
- Showing component only for authenticated user, but for every path, without rerendering each time path changes. HOT 5
- SecureRoute is not passing Router props to my component HOT 2
- security vulnerabilities from lodash HOT 2
- react-router Link to a SecureRoute yields "OAuth flow response state doesn't match request state" HOT 4
- /implicit/callback route not working for any version of @okta/okta-angular HOT 5
- Security vulnerability in jwks-rsa's dependency HOT 5
- Server-side request forgery HOT 3
- Creating Multiple OIDC instances in Nodejs('@okta/oidc-middleware') HOT 6
- Error while resolving signing key for kid . Unable to verify first certificate HOT 2
- JWT-verifier -> [JwtParseError: Unexpected signature algorithm] HOT 6
- JWT-verifier -> Unable to find a signing key that matches 'xxxx' HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from okta-oidc-js.