auth0 / auth0-react

Auth0 SDK for React Single Page Applications (SPA)
MIT License
887 stars 256 forks source link

checkJwt middleware doesn't work on API example #678

Closed luis199230 closed 10 months ago

luis199230 commented 10 months ago

Checklist

Description

I added tokenSigningAlg parameter to auth method from express-oauth2-jwt-bearer

Reproduction

  1. npm i
  2. npm run build
  3. npm run install:examples
  4. npm run start:api

Additional context

With this I solved the issue

const checkJwt = auth({
  audience: AUDIENCE,
  issuerBaseURL: `https://${DOMAIN}`,
  tokenSigningAlg: SIGNATURE
});

auth0-react version

2.2.3

React version

^18.2.0

Which browsers have you tested in?

Chrome

frederikprijck commented 10 months ago

Thanks for reaching out. I assume u are using HS256? If that's the case, it's expected that you need to set that. But for RS256, you shouldnt.

Not sure I understand what the specific question here is tho, can you elaborate?

frederikprijck commented 10 months ago

Closing, can reopen if needed.