Totally insecure??
See original GitHub issueI see this example in the docs:
const ui = SwaggerUIBundle({...})
// Method can be called in any place after calling constructor SwaggerUIBundle
ui.initOAuth({
clientId: "your-client-id",
clientSecret: "your-client-secret-if-required",
realm: "your-realm",
appName: "your-app-name",
scopeSeparator: " ",
additionalQueryStringParams: {test: "hello"}
})
clientSecret: “your-client-secret-if-required”,
Client secret? In the JS? That is sent to the user’s browser?
Can someone please explain to me how this could ever be secure? As far as I understand it, the client secret is meant for server-to-server communication, where the client secret is safe from prying eyes on the server. But if you are doing auth from the browser (as Swagger is doing) you should, AFAIK, never have a client secret in there.
I think we should remove this line from the docs. The client secret should never be used in combination with web-based apps. It’s for server-to-server communication.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Rockit Music – Total Insecurity Lyrics - Genius
Total Insecurity Lyrics: Don't misbehave, they're still untamed / Here to travel the night, can I live without light?
Read more >How to Overcome Insecurity: Why Am I So Insecure?
I struggle with a lot of self identity/image issues. Writing it out, and facing these things was terribly emotional, but absolutely needed. Just...
Read more >Totally Insecure Web Application Project (TIWAP) - GitHub
Totally Insecure Web Application Project (TIWAP). Contribute to tombstoneghost/TIWAP development by creating an account on GitHub.
Read more >The 3 Most Common Causes of Insecurity and How to Beat ...
Perfectionism not only can cause insecurity, but depression, anxiety, eating disorders, and chronic fatigue as well. Stefano Tinti/Shutterstock.
Read more >6 Signs of Insecurity in a Relationship - Brides
"You can be insecure in your relationship and absolutely be with the right person," Jeney explains. "You may just be self-sabotaging because ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@webron I think showing people how to shoot themselves in the foot isn’t wise. The client_secret should simply never be in an HTML page. Period. So why do we show it in an example?
@Download Sorry for taking so long, but thanks for the advice. I’ve added a warning to it in the documentation, keep the feedback coming.