Skip to content

Commit f88c9a8

Browse files
committed
Remove deprecated iaw-auth-token usage
1 parent 9cf2d56 commit f88c9a8

File tree

1 file changed

+5
-4
lines changed
  • Thirdweb/Thirdweb.Wallets/InAppWallet/EmbeddedWallet.Authentication

1 file changed

+5
-4
lines changed

Thirdweb/Thirdweb.Wallets/InAppWallet/EmbeddedWallet.Authentication/Server.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,11 @@ internal Server(ThirdwebClient client, IThirdwebHttpClient httpClient)
5757
internal override async Task<List<LinkedAccount>> LinkAccountAsync(string currentAccountToken, string authTokenToConnect)
5858
{
5959
var uri = MakeUri2024("/account/connect");
60-
var content = MakeHttpContent(new { accountAuthTokenToConnect = authTokenToConnect });
61-
this._httpClient.AddHeader("Authorization", $"Bearer iaw-auth-token:{currentAccountToken}");
62-
var response = await this._httpClient.PostAsync(uri.ToString(), content).ConfigureAwait(false);
63-
this._httpClient.RemoveHeader("Authorization");
60+
var request = new HttpRequestMessage(HttpMethod.Post, uri)
61+
{
62+
Content = MakeHttpContent(new { accountAuthTokenToConnect = authTokenToConnect })
63+
};
64+
var response = await this.SendHttpWithAuthAsync(request, currentAccountToken).ConfigureAwait(false);
6465
await CheckStatusCodeAsync(response).ConfigureAwait(false);
6566

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

0 commit comments

Comments
 (0)