This PR aims to add an optional x-kick-auth header to each callKickApi() call.
In my case, this resolves the issue of being unable to use the kick-token-provider endpoint when using client.api.authentication.login(). This was due to a CloudFlare challenge before the response of the endpoint.
SOMETHING_WENT_WRONG: Failed to retrieve pre-login tokens
This header was verified using curl with and without the header on the machine receiving the CloudFlare challenge.
I wasn't sure if I should have added the auth token as an optional field inside of the LoginCredentials interface or as an extra kickAuth parameter when calling login(), so I chose the latter.
This PR aims to add an optional
x-kick-auth
header to eachcallKickApi()
call.In my case, this resolves the issue of being unable to use the
kick-token-provider
endpoint when usingclient.api.authentication.login()
. This was due to a CloudFlare challenge before the response of the endpoint.This header was verified using
curl
with and without the header on the machine receiving the CloudFlare challenge.I wasn't sure if I should have added the auth token as an optional field inside of the
LoginCredentials
interface or as an extrakickAuth
parameter when callinglogin()
, so I chose the latter.