Authorizing admins relies on an Auth0 action that adds app_metadata for each user to their id_token. To do this:
node svelte-app/deploy-auth0.js
Applications -> APIs -> Auth0 Management API -> API Explorer
Applications -> Applications -> Default App
Allowed Callback URLs
, Allowed Logout URLs
and Allowed Web Origins
You also need the certificates for your domain. Add them to this folder as fullchain.pem and privkey.pem
In your .env, set the following variables:
openssl x509 -in mycert.pem -noout -pubkey
, where mycert.pem is the AUTH0_CERT from deploy-auth0.jsRun docker compose up --abort-on-container-exit
See docker-compose.yml for the environment variables you need to set when running the development servers outside of docker-compose. When developing one of the services, you can run the other services with development servers or use their Dockerfiles. The commands for running a development server are listed below:
cargo run
npm run dev
python flask_app.py
After signing in into the app, set your own users app_metadata in Auth0 User Management to {"admin":true}
. You can now edit course information and post the source text for lectures.