JWT token based auth
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"github.com/google/uuid"
|
||||
"github.com/lytics/base62"
|
||||
)
|
||||
|
||||
func RandomSecret() string {
|
||||
// cannot error
|
||||
bin, _ := uuid.New().MarshalBinary()
|
||||
return base62.StdEncoding.EncodeToString(bin)
|
||||
}
|
||||
Reference in New Issue
Block a user