Git Product home page Git Product logo

Comments (3)

justinmchase avatar justinmchase commented on June 14, 2024 3

I managed to resolve it and will add some notes here in case anyone else experiences the issue, but apparently Microsoft produces unverifiable tokens unless you add a special scope when requesting the access token. Its quite confusing but here are some docs for any future readers:

description of the issue

AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet#609 (comment)

how to add a scope

https://learn.microsoft.com/en-us/azure/active-directory/develop/quickstart-configure-app-expose-web-apis

oath client code with an example scope

export const oauth = new OAuth2Client({
  clientId: config.azureClientId,
  clientSecret: config.azureClientSecret,
  redirectUri: config.azureRedirectUri,
  authorizationEndpointUri:
    "https://login.microsoftonline.com/22dddbf3-6a10-486d-94dc-b3eca6a4d13e/oauth2/v2.0/authorize",
  tokenUri:
    "https://login.microsoftonline.com/22dddbf3-6a10-486d-94dc-b3eca6a4d13e/oauth2/v2.0/token",
  defaults: {
    scope: "api://ce608137-10fc-4b3e-824b-a3b601a2f424/Example openid",
  },
});

from jose.

justinmchase avatar justinmchase commented on June 14, 2024

Here is the open id configuration url:
https://login.microsoftonline.com/22dddbf3-6a10-486d-94dc-b3eca6a4d13e/.well-known/openid-configuration

from jose.

panva avatar panva commented on June 14, 2024

Hello @justinmchase

Using a valid azure token, I can't seem to figure out how to verify it using this library.

That's not something a bug tracker is for. There is no bug presented in your issue. Please open a q&a discussion instead for non-bugs.

If you are certain there is a bug in the library then please prepare actual steps to reproduce, that means code that can be copy pasted and run that ends with the issue reproduced.

from jose.

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.