Pass Credentials to Embedded Swagger UI's Try it Out
- 2 years ago
Hi wesleytang ,
Sounds like it could either be a bug, or it could be something unusual in how it's embedded.
When you say the user is already logged in, are you referring to a Cookie session? That should work just fine if SwaggerUI is part of the same domain (as you said, embedded).
Setting credentials = include, might help (not sure how the interceptor would be set up for that, but I know it's in there somewhere)... but it should also only apply to different domains, not the same domain you're already on.
Take a look at the Network tab in your browser and see what headers are (not) being sent.
Also note that "Authenticating" inside SwaggerUI doesn't create a cookie session for your underlying app, that doesn't set up a cookie only updates internal state.