scottie1984 / swagger-ui-express

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.
MIT License
1.41k stars 225 forks source link

Authorization: Bearer [object Object] #291

Open muhammadhoti opened 2 years ago

muhammadhoti commented 2 years ago

Swagger on local works fine and send a correct Authorization token Deploying on Dev environment with same configuration cause this.

Authorization: Bearer [object Object]

its converting JWT token to [object Object] it was working perfectly a couple of days ago with the same modules

"swagger-ui-express": "^4.3.0", "@nestjs/swagger": "^5.2.0"

imsamurai commented 2 years ago

https://github.com/swagger-api/swagger-ui/issues/7926

philipcolejohnson commented 2 years ago

Yes—this is happening to me, too.

There seems to be a regression in swagger-ui-dist 4.7.0 that makes the bearer token change to [object Object] in requests, which makes it impossible to make authenticated requests. This is fixed in swagger-ui-dist version 4.8.1