Skip to content

Commit

Permalink
Update authorization.go
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizerpwn committed Sep 21, 2023
1 parent 7dc7841 commit 7cbebb3
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions utils/authorization.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package utils

import (
"crypto/rand"
"crypto/sha256"
"encoding/base64"
"fmt"
"io"
"net/http"
Expand All @@ -14,13 +12,6 @@ import (
"golang.org/x/crypto/hkdf"
)

func GenerateRandomToken() string {
// >> Generate a random token for the refresh token
tokenBytes := make([]byte, 32)
rand.Read(tokenBytes)
return base64.StdEncoding.EncodeToString(tokenBytes)
}

func VerifyToken(c *gin.Context) {
// >> Get cookie from request
cookie, err := c.Request.Cookie("next-auth.session-token")
Expand Down

0 comments on commit 7cbebb3

Please sign in to comment.