Skip to content

iamgeef/heroku-express-auth0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heroku Express Auth0

This is a quick setup for a Terraform configuration that deploys a basic express web-app with auth0 authentication onto heroku.
The web-app is taken from the official auth0 blog post: https://auth0.com/blog/create-a-simple-and-secure-node-express-app/
source code: https://github.com/auth0-blog/wab-portal-express

Requirements

Heroku account created
Payment method added to the heroku account

Important

Terraform is NOT configured with a remote backend so your state file will be local to the machine where you are running the commands.

How to use

Create your tfvars file using the provided ./terraform/vars.tfvars file.

image info

note: your heroku_app_name must be unique. If someone has already used it, you'll get the following error:

image info

From the terraform directory, initialise Terraform terraform init.

image info

From the terraform directory run terraform apply -var-file=vars.tfvars

image info

Once deployed, use the heroku console to sso into the auth0 console for your addon config:

image info

navigate to the default application config

image info

add the heroku app domain to the allowed logout urls:

image info

Go to your heroku-url and click the login button to start the auth0 process.

image info

Cleanup

Run terraform destroy -var-file=vars.tfvars to remove the resources.

About

template that configures heroku with auth0

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published