Merge pull request #428 from vertextau/oauth-fix
Improve randomString function
This commit is contained in:
commit
10ea161f92
1 changed files with 2 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ package auth
|
|||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"encoding/hex"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
|
|
@ -20,7 +21,7 @@ func randomString(length int) (string, error) {
|
|||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return fmt.Sprintf("%x", b), nil
|
||||
return hex.EncodeToString(b), nil
|
||||
}
|
||||
|
||||
// OAuthFlow represents the setup for authenticating with GitHub
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue