@@ -61,7 +61,7 @@ private void Awake()
61
61
62
62
#region Connection Flow
63
63
64
- public async Task < User > Connect ( EmbeddedWallet embeddedWallet , string email , AuthOptions authOptions )
64
+ public virtual async Task < User > Connect ( EmbeddedWallet embeddedWallet , string email , AuthOptions authOptions )
65
65
{
66
66
var config = Resources . Load < ThirdwebConfig > ( "ThirdwebConfig" ) ;
67
67
_customScheme = config != null ? config . customScheme : null ;
@@ -135,7 +135,7 @@ public async Task<User> Connect(EmbeddedWallet embeddedWallet, string email, Aut
135
135
return _user ;
136
136
}
137
137
138
- public void Cancel ( )
138
+ public virtual void Cancel ( )
139
139
{
140
140
_exception = new UnityException ( "User cancelled" ) ;
141
141
}
@@ -144,7 +144,7 @@ public void Cancel()
144
144
145
145
#region Email OTP Flow
146
146
147
- private async Task LoginWithOTP ( )
147
+ public virtual async Task LoginWithOTP ( )
148
148
{
149
149
if ( _email == null )
150
150
throw new UnityException ( "Email is required for OTP login" ) ;
@@ -154,7 +154,7 @@ private async Task LoginWithOTP()
154
154
EmbeddedWalletCanvas . SetActive ( true ) ;
155
155
}
156
156
157
- private async Task OnSendOTP ( )
157
+ public virtual async Task OnSendOTP ( )
158
158
{
159
159
try
160
160
{
@@ -169,7 +169,7 @@ private async Task OnSendOTP()
169
169
}
170
170
}
171
171
172
- private async void OnSubmitOTP ( )
172
+ public virtual async void OnSubmitOTP ( )
173
173
{
174
174
OTPInput . interactable = false ;
175
175
RecoveryInput . interactable = false ;
@@ -207,7 +207,7 @@ private async void OnSubmitOTP()
207
207
208
208
#region OAuth2 Flow
209
209
210
- private async Task LoginWithOauth ( string authProviderStr )
210
+ public virtual async Task LoginWithOauth ( string authProviderStr )
211
211
{
212
212
if ( Application . isMobilePlatform && string . IsNullOrEmpty ( _customScheme ) )
213
213
throw new UnityException ( "No custom scheme provided for mobile deeplinks, please set one in your ThirdwebConfig (found in ThirdwebManager)" ) ;
@@ -251,7 +251,7 @@ private async Task LoginWithOauth(string authProviderStr)
251
251
}
252
252
}
253
253
254
- private async void OnSubmitRecoveryOauth ( string authProviderStr , string authResult )
254
+ public virtual async void OnSubmitRecoveryOauth ( string authProviderStr , string authResult )
255
255
{
256
256
try
257
257
{
@@ -266,7 +266,7 @@ private async void OnSubmitRecoveryOauth(string authProviderStr, string authResu
266
266
}
267
267
}
268
268
269
- private async Task < string > GetLoginLink ( string authProvider )
269
+ public virtual async Task < string > GetLoginLink ( string authProvider )
270
270
{
271
271
string loginUrl = await _embeddedWallet . FetchHeadlessOauthLoginLinkAsync ( authProvider ) ;
272
272
string platform = "unity" ;
@@ -279,7 +279,7 @@ private async Task<string> GetLoginLink(string authProvider)
279
279
280
280
#region JWT Flow
281
281
282
- private async Task LoginWithJWT ( string jwtToken , string encryptionKey , string recoveryCode = null )
282
+ public virtual async Task LoginWithJWT ( string jwtToken , string encryptionKey , string recoveryCode = null )
283
283
{
284
284
if ( string . IsNullOrEmpty ( jwtToken ) )
285
285
throw new UnityException ( "JWT token is required for JWT login!" ) ;
@@ -295,7 +295,7 @@ private async Task LoginWithJWT(string jwtToken, string encryptionKey, string re
295
295
296
296
#region Auth Endpoint Flow
297
297
298
- private async Task LoginWithAuthEndpoint ( string payload , string encryptionKey , string recoveryCode = null )
298
+ public virtual async Task LoginWithAuthEndpoint ( string payload , string encryptionKey , string recoveryCode = null )
299
299
{
300
300
if ( string . IsNullOrEmpty ( payload ) )
301
301
throw new UnityException ( "Auth payload is required for Auth Endpoint login!" ) ;
@@ -311,15 +311,15 @@ private async Task LoginWithAuthEndpoint(string payload, string encryptionKey, s
311
311
312
312
#region Common
313
313
314
- private void DisplayRecoveryInput ( bool hideOtpInput )
314
+ public virtual void DisplayRecoveryInput ( bool hideOtpInput )
315
315
{
316
316
if ( hideOtpInput )
317
317
OTPInput . gameObject . SetActive ( false ) ;
318
318
RecoveryInput . gameObject . SetActive ( true ) ;
319
319
EmbeddedWalletCanvas . SetActive ( true ) ;
320
320
}
321
321
322
- private void ShowRecoveryCodes ( EmbeddedWallet . VerifyResult res )
322
+ public virtual void ShowRecoveryCodes ( EmbeddedWallet . VerifyResult res )
323
323
{
324
324
if ( res . MainRecoveryCode != null && res . WasEmailed . HasValue && res . WasEmailed . Value == false )
325
325
{
0 commit comments