This application is represented by an OpenID Connect application in Okta, so we need to configure one. We'll use the Okta Terraform Provider to automate this process.
- Install terraform
-
Using the provided Makefile:
cd
to the/byob-dashboard
(root) folder (that contains the Makefile) and run:make okta
-
(Optional) Or, if you prefer not to use the Makefile, follow these steps.
cd
into the/terraform
folder, then runterraform init && terraform plan -out=okta.setup.tfplan -lock=false
terraform apply -auto-approve okta.setup.tfplan
-
(Optional) If you're more confortable manually configuring Okta, refer to the manual steps below.
- In your Developer Console, navigate to the Applications menu, click Add Application and select Single-Page App
- Click Next, then enter an Application Name. Then:
- Set Base URIs to
http://localhost:8081/
- Add an entry in Redirect URIs:
http://localhost:8081/oauth/callback
- Leave the default setting, Group assignments = Everyone
- Select Authorization Code and deselect the default Implicit checkbox
- Set Base URIs to
- Click Done to redirect back to the General tab of your application.
- Make note of the Client ID, as it will be needed environment configuration.
- Make sure that Use PKCE (for public clients) (underneath the Client Id) is selected
- Navigate to Api > Trusted Origins and add
http://localhost:8081
as a type = CORS entry. - Add a custom claim to the Auth Server you'll be using.:
- Name =
groups
- Value =
groups: matches regex.*
- Scopes =
Any
- Type =
id
- Included =
Always
- Name =
- Update the User Activation email template: Replace
${activationLink}
(see screenshot below) withhttp://localhost:8081/activate/${activationToken}