Skip to content

kaisugi/scala-play-github-oauth-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scala-play-github-oauth-demo

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_out

😄 logged-in (You can view secret page.)

logged_in

Live Demo on Heroku: https://scala-github-oauth-demo.herokuapp.com/

test locally

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.

Releases

No releases published

Packages

No packages published