I am trying to write a small app that uses the Github API and is hosted on github.io
I'm following the web application flow documentation which can be summarized as:
- App webpage redirects user to github.com with the client id parameter and a redirect url parameter that links the user back the app webpage
- Once the user authenticated on the github end, they are redirected to the app webpage with a temporary code parameter that can be used to get the access token which unlocks the API
- The POST request to obtain the access token from the temporary code requires submitting both the client id and the client secret
If the application is client side only (except the static page host), how should I handle the client secret? It can't be embedded within the application or the user can find it. Is it imperative that a server be used to mediate the authentication process?