Skip to content

Commit

Permalink
Remove deprecated iaw-auth-token usage
Browse files Browse the repository at this point in the history
  • Loading branch information
0xFirekeeper committed Oct 10, 2024
1 parent 9cf2d56 commit f88c9a8
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ internal Server(ThirdwebClient client, IThirdwebHttpClient httpClient)
internal override async Task<List<LinkedAccount>> LinkAccountAsync(string currentAccountToken, string authTokenToConnect)
{
var uri = MakeUri2024("/account/connect");
var content = MakeHttpContent(new { accountAuthTokenToConnect = authTokenToConnect });
this._httpClient.AddHeader("Authorization", $"Bearer iaw-auth-token:{currentAccountToken}");
var response = await this._httpClient.PostAsync(uri.ToString(), content).ConfigureAwait(false);
this._httpClient.RemoveHeader("Authorization");
var request = new HttpRequestMessage(HttpMethod.Post, uri)
{
Content = MakeHttpContent(new { accountAuthTokenToConnect = authTokenToConnect })
};
var response = await this.SendHttpWithAuthAsync(request, currentAccountToken).ConfigureAwait(false);
await CheckStatusCodeAsync(response).ConfigureAwait(false);

var res = await DeserializeAsync<AccountConnectResponse>(response).ConfigureAwait(false);
Expand Down

0 comments on commit f88c9a8

Please sign in to comment.