Skip to content

Commit 149e10c

Browse files
Fix: Missing developer client id or redirect url or platform in query param (#198)
Co-authored-by: andriimoonmana <a.dubyna@laguna.games>
1 parent 0b94ba8 commit 149e10c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Assets/Thirdweb/Core/Scripts/Wallets/ThirdwebInAppWallet.cs

100644100755
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public class ThirdwebInAppWallet : IThirdwebWallet
2020
public ThirdwebInAppWallet(string clientId, string bundleId)
2121
{
2222
_web3 = null;
23+
_clientId = clientId;
2324
_provider = WalletProvider.InAppWallet;
2425
_signerProvider = WalletProvider.LocalWallet;
2526
_embeddedWallet = new EmbeddedWallet(clientId, bundleId, "unity", ThirdwebSDK.version);

Assets/Thirdweb/Core/Scripts/WalletsUI/InAppWalletUI.cs

100644100755
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public class InAppWalletUI : MonoBehaviour
3939
protected string _callbackUrl;
4040
protected string _customScheme;
4141
protected CancellationTokenSource _cancellationTokenSource;
42-
protected string clientId;
42+
protected string _clientId;
4343

4444
#endregion
4545

@@ -74,6 +74,7 @@ public virtual async Task<User> Connect(EmbeddedWallet embeddedWallet, string em
7474
_embeddedWallet = embeddedWallet;
7575
_email = email;
7676
_phone = phoneNumber;
77+
_clientId = clientId;
7778
_user = null;
7879
_exception = null;
7980
OTPInput.text = "";
@@ -367,7 +368,7 @@ public virtual async Task<string> GetLoginLink(string authProvider)
367368
string loginUrl = await _embeddedWallet.FetchHeadlessOauthLoginLinkAsync(authProvider);
368369
string platform = "unity";
369370
string redirectUrl = UnityWebRequest.EscapeURL(Application.isMobilePlatform ? _customScheme : "http://localhost:8789/");
370-
string developerClientId = UnityWebRequest.EscapeURL(clientId);
371+
string developerClientId = UnityWebRequest.EscapeURL(_clientId);
371372
return $"{loginUrl}?platform={platform}&redirectUrl={redirectUrl}&developerClientId={developerClientId}&authOption={authProvider}";
372373
}
373374

0 commit comments

Comments
 (0)