Commit 18b030bdb3af4549c5a5c428b219993b34ff8991
Exists in
master
and in
1 other branch
Merge pull request #224 from DoppioJP/master
Described how to configure GitHub authentication when served on Heroku.
Showing
1 changed file
with
37 additions
and
0 deletions
Show diff stats
README.md
@@ -233,6 +233,43 @@ You can change the requested account permissions by setting `github_access_scope | @@ -233,6 +233,43 @@ You can change the requested account permissions by setting `github_access_scope | ||
233 | </table> | 233 | </table> |
234 | 234 | ||
235 | 235 | ||
236 | +### GitHub authentication when served on Heroku | ||
237 | + | ||
238 | +You will need to set up Heroku variables accordingly as described in [Configuring GitHub authentication](#configuring-github-authentication): | ||
239 | + | ||
240 | +* GITHUB_AUTHENTICATION | ||
241 | + | ||
242 | +```bash | ||
243 | +heroku config:add GITHUB_AUTHENTICATION=true | ||
244 | +``` | ||
245 | + | ||
246 | +* GITHUB_CLIENT_ID | ||
247 | + | ||
248 | +```bash | ||
249 | +heroku config:add GITHUB_CLIENT_ID=the_client_id_provided_by_GitHub | ||
250 | +``` | ||
251 | + | ||
252 | +* GITHUB_SECRET | ||
253 | + | ||
254 | +```bash | ||
255 | +heroku config:add GITHUB_SECRET=the_secret_provided_by_GitHub | ||
256 | +``` | ||
257 | + | ||
258 | +* GITHUB_ACCESS_SCOPE - set only one scope `repo` or `public_repo`. If you really need to put more than one, separate them with comma. | ||
259 | + | ||
260 | +```bash | ||
261 | +heroku config:add GITHUB_ACCESS_SCOPE=repo,public_repo | ||
262 | +``` | ||
263 | + | ||
264 | +__Note__: To avoid restarting your Heroku app 4 times you can set Heroku variables in a single command, i.e: | ||
265 | + | ||
266 | +```bash | ||
267 | +heroku config:add GITHUB_AUTHENTICATION=true \ | ||
268 | +GITHUB_CLIENT_ID=the_client_id_provided_by_GitHub \ | ||
269 | +GITHUB_SECRET=the_secret_provided_by_GitHub \ | ||
270 | +GITHUB_ACCESS_SCOPE=repo,public_repo | ||
271 | +``` | ||
272 | + | ||
236 | ### Configuring LDAP authentication: | 273 | ### Configuring LDAP authentication: |
237 | 274 | ||
238 | * In `config/config.yml`, set `user_has_username` to `true` | 275 | * In `config/config.yml`, set `user_has_username` to `true` |