Skip to content

Commit

Permalink
Update device ID header in auth handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
rabilrbl authored Sep 10, 2024
1 parent f2b75cb commit f34465e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion internal/handlers/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ func LoginRefreshAccessToken() error {
req.Header.Set("Accept-Encoding", "gzip")
req.Header.Set("User-Agent", "okhttp/4.2.2")
req.Header.Set("accessToken", tokenData.AccessToken)
req.Header.Set("deviceid", utils.GetDeviceID())
req.SetBody(requestBodyJSON)

// Send the request
Expand Down
2 changes: 1 addition & 1 deletion pkg/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ var KVS *TomlStore
func Init() error {
KVS = &TomlStore{}
// store_vX.toml, where X is changed whenever new version requires re-login
filename := filepath.Join(GetPathPrefix(), "store_v3.toml")
filename := filepath.Join(GetPathPrefix(), "store_v4.toml")

KVS.mu.Lock()
defer KVS.mu.Unlock()
Expand Down
4 changes: 2 additions & 2 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ func LoginVerifyOTP(number, otp string) (map[string]string, error) {
Platform: LoginPayloadDeviceInfoInfoPlatform{
Name: "SM-G930F",
},
AndroidID: "6fcadeb7b4b10d77",
AndroidID: GetDeviceID(),
},
},
}
Expand Down Expand Up @@ -249,7 +249,7 @@ func Login(username, password string) (map[string]string, error) {
Name: "vbox86p",
Version: "8.0.0",
},
AndroidID: "6fcadeb7b4b10d77",
AndroidID: GetDeviceID(),
},
},
}
Expand Down

0 comments on commit f34465e

Please sign in to comment.