Can the Client Secret Safely Be Public? #54568
Select Topic AreaQuestion BodyHey there! I'm working on an app that will deploy GitHub pages sites through the API. To authenticate the user I'm wanting to use the OAuth web-app flow, but I need clarification about the security requirements of the Is it safe to embed that |
Replies: 2 comments 1 reply
|
Unfortunately it's not safe to embed the client_secret in a client-side app or open-source codebase where anybody can access it. A solution would be to use the Proof Key for Code Exchange (PKCE) extension. |
|
Does anybody know if there is a way to auto-fill the device activation page with a code through a query string parameter? That would make the workflow just about as friendly as the web app flow. |
It appears that's not supported from the GitHub docs:
It looks like the Device Flow would be a good substitute, though.
Slightly less convenient because the user has to input the code, but at least it can be done fully client-side without including the client secret.