invite: fix email confirmation jwt

same issue as with auth.go, expiry was a string causing the library to
see it as expired.
This commit is contained in:
Harvey Tindall
2021-08-26 18:39:50 +01:00
parent 1bfec54c93
commit 412fe31da6
3 changed files with 3 additions and 4 deletions
+1 -2
View File
@@ -4,7 +4,6 @@ import (
"html/template"
"io/fs"
"net/http"
"strconv"
"strings"
"time"
@@ -249,7 +248,7 @@ func (app *appContext) InviteProxy(gc *gin.Context) {
return
}
claims, ok := token.Claims.(jwt.MapClaims)
expiryUnix, err := strconv.ParseInt(claims["exp"].(string), 10, 64)
expiryUnix := int64(claims["exp"].(float64))
if err != nil {
fail()
app.err.Printf("Failed to parse key expiry: %s", err)