Coder Social home page Coder Social logo

Comments (5)

derisen avatar derisen commented on August 23, 2024

Hi @rwrife, apologies for the very late response. Looks like there was an issue when accessing the req.session.key (which internally is used for encrypting/decrypting the state parameter). I can't come up with anything off the top of my head other than somehow your express session is not properly properly set up. Can you confirm that?

And sorry for the cryptic error message, but we are picking up this project again and we will work on adding better error logging for such issues.

from microsoft-identity-express.

hnougher avatar hnougher commented on August 23, 2024

I can get the same thing with more detail.

Good hint on something in express session.
The easiest temporary solution for me seems to be to set cookie.secure=false even though that is not recommended.

node:internal/errors:465
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object. Received undefined
    at new NodeError (node:internal/errors:372:5)
    at Function.from (node:buffer:323:9)
    at _callee$ (/app/node_modules/microsoft-identity-express/dist/microsoft-identity-express.cjs.development.js:1556:127)
    at tryCatch (/app/node_modules/microsoft-identity-express/dist/microsoft-identity-express.cjs.development.js:167:40)
    at Generator.invoke [as _invoke] (/app/node_modules/microsoft-identity-express/dist/microsoft-identity-express.cjs.development.js:398:22)
    at Generator.next (/app/node_modules/microsoft-identity-express/dist/microsoft-identity-express.cjs.development.js:223:21)
    at asyncGeneratorStep (/app/node_modules/microsoft-identity-express/dist/microsoft-identity-express.cjs.development.js:18:24)
    at _next (/app/node_modules/microsoft-identity-express/dist/microsoft-identity-express.cjs.development.js:40:9)
    at /app/node_modules/microsoft-identity-express/dist/microsoft-identity-express.cjs.development.js:47:7
    at new Promise (<anonymous>) {
  code: 'ERR_INVALID_ARG_TYPE'
}

from microsoft-identity-express.

derisen avatar derisen commented on August 23, 2024

@hnougher apologies for late response. Thanks for the debug. cookie.secure should be false if the app is running on http, but are you saying you run into this even when running the app on a https connection?

from microsoft-identity-express.

hnougher avatar hnougher commented on August 23, 2024

@derisen That is correct.
It was annoyingly working fine in development (http localhost etc) and breaking for production (https only).

from microsoft-identity-express.

derisen avatar derisen commented on August 23, 2024

Closing as completed.

from microsoft-identity-express.

Related Issues (5)

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.