Adds middleware to your express app to serve the Swagger UI bound to your Swagger document. This acts as living documentation for your API hosted from within your app.
I need to be able to authenticate and authorize API users against an Auth0 domain. Auth0 is configured using a "single page application" flow, which is already used by a React application to call the same APIs.
I've configured oauth2 as follows (tried authorizationCode , implicit and openIdConnect as described below, with identical results). Can you help me determine what I'm doing wrong?
I get the "Authorize" dialog, it pre-populates the client id/secret from my configuration, users are redirected to Auth0's login page, and it even obtains an ID token and and access token. However, the token obtained and passed by Swagger to the API turns to be an incomplete/invalid JWT:
I need to be able to authenticate and authorize API users against an Auth0 domain. Auth0 is configured using a "single page application" flow, which is already used by a React application to call the same APIs.
I've configured oauth2 as follows (tried
authorizationCode
,implicit
andopenIdConnect
as described below, with identical results). Can you help me determine what I'm doing wrong?Defined inline with each route, I have:
I get the "Authorize" dialog, it pre-populates the client id/secret from my configuration, users are redirected to Auth0's login page, and it even obtains an ID token and and access token. However, the token obtained and passed by Swagger to the API turns to be an incomplete/invalid JWT:
InvalidTokenError: Invalid Compact JWS<br> at /project/node_modules/express-oauth2-jwt-bearer/dist/index.js:271:19