Skip to content

Commit d39908e

Browse files
token creation bugfix
1 parent 53e5c54 commit d39908e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

handlers/auth.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ func (ah AuthHandler) Authenticate(c *fiber.Ctx) error {
6363

6464
func createTokens() (string, string, error) {
6565
atClaims := jwt.MapClaims{}
66+
atClaims["exp"] = time.Now().Add(time.Minute * time.Duration(configuration.JWT_EXPIRES_IN_MINUTES)).Unix()
6667
at := jwt.NewWithClaims(jwt.SigningMethodHS256, atClaims)
6768
token, err := at.SignedString([]byte(configuration.JWT_SECRET))
6869
if err != nil {

0 commit comments

Comments
 (0)