Hosting for your organisation - Groverkss/Discord-CAS Wiki

Hosting the webportal

First, you need to host the web portal. The web portal does four things:

  1. Authenticates you against a CAS portal (feel free to change this to SAML, OAuth2, or whatever your organization prefers to use).
  2. Authenticates you against Discord OAuth2.
  3. Stores this data in MongoDB.
  4. Checks if the server is allowed in the server_config.ini

Change /portal/utils/config.js and host it where it is publically accessible. You may need to change the source code corresponding to your organization's CAS attributes; specifically, the /cas express endpoint has settings for which attributes to fetch from the CAS server response.

Hosting the bot

The bot should have access to the MongoDB database that the web portal stores entries in.

Change the config parameters in /bot/.env.template and rename it to /bot/.env. Host like you would host a normal discord bot.

The only difference here is that we are not making available our Discord bot instance and the server instance for public use.