Skip to content

Commit a0f73c1

Browse files
committed
feat : env on jwt
1 parent f726ed0 commit a0f73c1

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/utils/jwt.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,15 @@ package utils
22

33
import (
44
"fmt"
5+
"os"
56
"time"
67

78
"github.com/dgrijalva/jwt-go"
89
)
910

10-
var jwtSecret = []byte("your-secret-key")
11+
12+
var jwtToken = os.Getenv("jwt")
13+
var jwtSecret = []byte(jwtToken)
1114

1215
func ValidateJWTToken(tokenString string) (jwt.MapClaims, error) {
1316
token, err := jwt.Parse(tokenString, func(token *jwt.Token) (interface{}, error) {

vercel.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)