This is a Scala Play Framework web app to give an example of how to login via GitHub OAuth Authentication.
(A detailed explanation in Japanese: Scala + PlayFramework + pac4j での GitHub ログインの実装)
😐 not logged-in (You cannot view secret page.)
😄 logged-in (You can view secret page.)
Live Demo on Heroku: https://scala-github-oauth-demo.herokuapp.com/
git clone https://github.com/HelloRusk/scala-play-github-oauth-demo.git
cd scala-play-github-oauth-demo
Get your GitHub Client ID & Secret (https://github.com/settings/developers). Please make sure that Authorization callback URL is fixed to http://localhost:9000/oauth_callback
.
Set demoapp.client_id
and demoapp.client_secret
in conf/application.conf
respectively.
After that
sbt run
and check http://localhost:9000.