Run the dockerized application by executing the following command:
docker-compose up
And visit https://localhost with your favourite web browser.
You will need to configure at least 1 single sign-on provider. The more the better.
- Go to Facebook for Developers.
- Go to
My Apps
and create a new app by clicking onCreate App
(select "Build Connected Experiences"). - Scroll down and under
Add Products to Your App
, clickSet Up
in theFacebook Login
card. In the left side navigation panel, go toFacebook Login
>Settings
, underValid OAuth Redirect URIs
enterhttps://localhost/api/v1/single-sign-on/facebook/callback
. - Go to
Settings
>Basic
and copyApp ID
andApp Secret
. - In
docker-compose.yml
, replace the values ofFACEBOOK_CLIENT_ID
andFACEBOOK_CLIENT_SECRET
with the values ofApp ID
andApp Secret
respectively.
- On github.com, go to
Settings
>Developer Settings
>OAuth Apps
(or click here). - Click on
New OAuth App
. - Fill in
https://localhost
forHomepage URL
andhttps://localhost/api/v1/single-sign-on/github/callback
forAuthorization callback URL
, and click onRegister Application
. - From
General
, copyClient ID
and generate a newClient Secret
. - In
docker-compose.yml
, replace the values ofGITHUB_CLIENT_ID
andGITHUB_CLIENT_SECRET
with the values ofClient ID
andClient Secret
respectively.
- Go to Google Console Developer APIs & Services
- From the projects list, create a new project.
- Go to
OAuth consent screen
in the left side navigation panel. - Configure the
OAuth consent screen
. Fill in all required fields and clicksave and continue
. - Go to
Credentials
in the left side navigation panel. - Click
create credentials
in the top navigation panel and selectOAuth Client ID
. ForApplication Type
selectWeb application
. UnderAuthorized redirect URIs
add the callback urihttps://localhost/api/v1/single-sign-on/google/callback
. Finally, clickcreate
. - Copy
Client ID
andClient Secret
. - In
docker-compose.yml
, replace the values ofGOOGLE_CLIENT_ID
andGOOGLE_CLIENT_SECRET
with the values ofClient ID
andClient Secret
respectively.
If you're experiencing difficulties setting up the OAuth Client, see https://support.google.com/cloud/answer/6158849.