다음 틱 토큰 받아올때 크래시 수정
This commit is contained in:
@ -34,9 +34,8 @@ func eosTokenRefresh(target *unsafe.Pointer, ctx context.Context) {
|
|||||||
|
|
||||||
endpoint := "https://api.epicgames.dev/auth/v1/oauth/token"
|
endpoint := "https://api.epicgames.dev/auth/v1/oauth/token"
|
||||||
auth := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", config.EosClientId, config.EosClientSecret)))
|
auth := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", config.EosClientId, config.EosClientSecret)))
|
||||||
body := bytes.NewBufferString("grant_type=client_credentials&deployment_id=" + config.EosDeploymentId)
|
|
||||||
for {
|
for {
|
||||||
req, _ := http.NewRequest("POST", endpoint, body)
|
req, _ := http.NewRequest("POST", endpoint, bytes.NewBufferString("grant_type=client_credentials&deployment_id="+config.EosDeploymentId))
|
||||||
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
|
||||||
req.Header.Set("Accept", "application/json")
|
req.Header.Set("Accept", "application/json")
|
||||||
req.Header.Set("Authorization", fmt.Sprintf("Basic %s", auth))
|
req.Header.Set("Authorization", fmt.Sprintf("Basic %s", auth))
|
||||||
|
|||||||
Reference in New Issue
Block a user