diff --git a/auth.go b/auth.go index af2fbc5..e654be8 100644 --- a/auth.go +++ b/auth.go @@ -6,6 +6,7 @@ import ( "encoding/hex" "encoding/json" "io" + "log" "net/http" "github.com/gin-contrib/sessions" @@ -47,6 +48,7 @@ func getLoginCallback(c *gin.Context) { token, err := discordConf.Exchange(context.Background(), c.Query("code")) if err != nil { + log.Println(err) c.HTML(http.StatusInternalServerError, "error_raw.tmpl", gin.H{ "errorMessage": "Failed to exchange code for token", }) @@ -55,6 +57,7 @@ func getLoginCallback(c *gin.Context) { res, err := discordConf.Client(context.Background(), token).Get("https://discord.com/api/users/@me") if err != nil { + log.Println(err) c.HTML(http.StatusInternalServerError, "error_raw.tmpl", gin.H{ "errorMessage": "Failed to get user details from Discord", })