Comments (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
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.
Here is the open id configuration url:
https://login.microsoftonline.com/22dddbf3-6a10-486d-94dc-b3eca6a4d13e/.well-known/openid-configuration
from jose.
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)
- Unable to build Angular project with Jose HOT 1
- SignJWT exp type error HOT 2
- Cannot verify id token using remote jwks HOT 3
- Bun support ED25519 HOT 1
- Bun bun bun!! HOT 17
- Bun: SyntaxError: Import named 'KeyObject' not found in module 'crypto'. HOT 3
- Mocking URLs with msw/nock doesn't work with named imports. HOT 1
- [ES384] adding a single letter to the signature part causing a successful verification HOT 7
- Type "GetKeyFunction" is present in "types.d.ts" but not exported in "index.d.ts" HOT 1
- Check for `jwk.oth` should also check for `null` value HOT 2
- CryptoKey is not extractable HOT 1
- JWKS Timeout : request timed out HOT 1
- Cannot read properties of undefined (reading 'base64url') HOT 7
- Claims validation should not mutate incoming `requiredClaims` array HOT 6
- jose importSPKI error TypeError: "spki" must be SPKI formatted string HOT 2
- Bun: Export named 'diffieHellman' not found in module 'crypto'. HOT 1
- Maybe slightly tweak the exports? HOT 4
- createLocalJWKSet should not generate a TS error when called with immutable input HOT 2
- Signature verification works in Node.js but fails in Cloudflare Workers HOT 1
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 jose.