inspired by hasura backend plus and keycloak with few fundemental key differences
- auth service handels only authentication/authroization related tasks
- rate-limiting, bot-detection etc to be handeled on a higher level through an API gateway, kong in this case.
- docker
- yarn
-
following line needs to be added to your hosts file in order for kong to find your host from the docker container.
<host IP> kong-upstream
or by following command in termianl
sudo sh -c 'echo "<host IP> kong-upstream" >> /etc/hosts'
-
to start docker containers run
docker-compose up -d
-
clone hasura-auth-login in the same folder as this repo and then build.
git clone https://github.com/hasura-auth/hasura-auth-login.git
and thenyarn build
-
migrate database by
yarn db:migrate
-
start auth service by
yarn dev
-
navigate to
http://localhost:8000/
Now if you login with default admin account below, you should redirected to localhost:3000
user: [email protected] pass: admin
-
values such as admin credentials/ callback url etc could be changed in .env file
-
when you change rsa key, remember to restart hasura service so that it calls jwks endpoints again