M README.md => README.md +1 -0
@@ 15,6 15,7 @@ Create a `.env` file with the following keys:
- `DISCORD_VERIFY_ROLE` - the role to be granted upon successful verification
- `DISCORD_TOKEN` - the Discord bot token
- `BASE_URL` - the base public-facing URL, used to construct redirects
+- `SUCCESS_URL` - the URL to redirect to on success
## Setup
1. Create an Azure "App Registration" in [the Azure Portal](https://portal.azure.com).
M main.go => main.go +1 -1
@@ 98,7 98,7 @@ func DiscordAuth(w http.ResponseWriter, r *http.Request) {
}
func Success(w http.ResponseWriter, r *http.Request) {
- http.Redirect(w, r, "https://wpi.edu", http.StatusFound)
+ http.Redirect(w, r, os.Getenv("SUCCESS_URL"), http.StatusFound)
}
func main() {