39
39
emailverification ,
40
40
)
41
41
from supertokens_python .recipe .emailverification .interfaces import (
42
- CreateEmailVerificationTokenEmailAlreadyVerifiedError ,
42
+ CreateEmailVerificationTokenEmailAlreadyVerifiedError , CreateEmailVerificationTokenOkResult ,
43
43
)
44
44
from supertokens_python .recipe .passwordless import ContactEmailOnlyConfig
45
45
from supertokens_python .recipe .passwordless .types import (
53
53
from supertokens_python .recipe .emailverification .asyncio import (
54
54
create_email_verification_token ,
55
55
)
56
+ from supertokens_python .recipe .thirdparty .providers import Github
56
57
from supertokens_python .recipe .thirdpartypasswordless .asyncio import (
57
58
passwordlessSigninup ,
58
59
thirdparty_sign_in_up ,
@@ -131,10 +132,11 @@ async def test_email_verify_default_backward_compatibility(
131
132
),
132
133
framework = "fastapi" ,
133
134
recipe_list = [
135
+ emailverification .init (),
134
136
thirdpartypasswordless .init (
135
137
contact_config = ContactEmailOnlyConfig (),
136
138
flow_type = "USER_INPUT_CODE_AND_MAGIC_LINK" ,
137
- providers = [],
139
+ providers = [Github ( client_id = "" , client_secret = "" )], # Note: providers must be set to init tp recipe
138
140
),
139
141
session .init (),
140
142
],
@@ -214,7 +216,7 @@ async def create_and_send_custom_email(
214
216
thirdpartypasswordless .init (
215
217
contact_config = ContactEmailOnlyConfig (),
216
218
flow_type = "USER_INPUT_CODE_AND_MAGIC_LINK" ,
217
- providers = [],
219
+ providers = [Github ( client_id = "" , client_secret = "" )], # Note: providers must be set to init tp recipe
218
220
),
219
221
session .init (),
220
222
],
@@ -291,7 +293,7 @@ async def send_email(
291
293
thirdpartypasswordless .init (
292
294
contact_config = ContactEmailOnlyConfig (),
293
295
flow_type = "USER_INPUT_CODE_AND_MAGIC_LINK" ,
294
- providers = [],
296
+ providers = [Github ( client_id = "" , client_secret = "" )], # Note: providers must be set to init tp recipe
295
297
),
296
298
session .init (),
297
299
],
@@ -430,7 +432,7 @@ async def send_email_override(
430
432
thirdpartypasswordless .init (
431
433
contact_config = ContactEmailOnlyConfig (),
432
434
flow_type = "USER_INPUT_CODE_AND_MAGIC_LINK" ,
433
- providers = [],
435
+ providers = [Github ( client_id = "" , client_secret = "" )], # Note: providers must be set to init tp recipe
434
436
),
435
437
session .init (),
436
438
],
@@ -537,6 +539,7 @@ async def send_email_override(
537
539
),
538
540
framework = "fastapi" ,
539
541
recipe_list = [
542
+ emailverification .init (),
540
543
thirdpartypasswordless .init (
541
544
contact_config = ContactEmailOnlyConfig (),
542
545
flow_type = "USER_INPUT_CODE_AND_MAGIC_LINK" ,
@@ -559,8 +562,9 @@ async def send_email_override(
559
562
create_token = await create_email_verification_token (pless_response .user .user_id )
560
563
561
564
assert isinstance (
562
- create_token , CreateEmailVerificationTokenEmailAlreadyVerifiedError
565
+ create_token , CreateEmailVerificationTokenOkResult
563
566
)
567
+ # TODO: Replaced CreateEmailVerificationTokenEmailAlreadyVerifiedError. Confirm if this is correct.
564
568
565
569
assert (
566
570
all ([outer_override_called , get_content_called , send_raw_email_called ]) is False
0 commit comments