Skip to content

Commit 45f2889

Browse files
committed
fix: Fix failing auth react tests related to passwordless
1 parent 3cf05d0 commit 45f2889

File tree

1 file changed

+10
-4
lines changed
  • tests/auth-react/fastapi-server

1 file changed

+10
-4
lines changed

tests/auth-react/fastapi-server/app.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ async def authorisation_url_get(
914914
passwordless_init = passwordless.init(
915915
contact_config=ContactEmailOnlyConfig(),
916916
flow_type=flow_type,
917-
sms_delivery=passwordless.SMSDeliveryConfig(CustomPlessSMSService()),
917+
email_delivery=passwordless.EmailDeliveryConfig(CustomPlessEmailService()),
918918
override=passwordless.InputOverrideConfig(
919919
apis=override_passwordless_apis
920920
),
@@ -923,9 +923,7 @@ async def authorisation_url_get(
923923
contact_config=ContactEmailOnlyConfig(),
924924
flow_type=flow_type,
925925
providers=providers_list,
926-
sms_delivery=thirdpartypasswordless.SMSDeliveryConfig(
927-
CustomPlessSMSService()
928-
),
926+
email_delivery=passwordless.EmailDeliveryConfig(CustomPlessEmailService()),
929927
override=thirdpartypasswordless.InputOverrideConfig(
930928
apis=override_thirdpartypasswordless_apis
931929
),
@@ -960,13 +958,15 @@ async def authorisation_url_get(
960958
passwordless_init = passwordless.init(
961959
contact_config=ContactPhoneOnlyConfig(),
962960
flow_type="USER_INPUT_CODE_AND_MAGIC_LINK",
961+
email_delivery=passwordless.EmailDeliveryConfig(CustomPlessEmailService()),
963962
sms_delivery=passwordless.SMSDeliveryConfig(CustomPlessSMSService()),
964963
override=passwordless.InputOverrideConfig(apis=override_passwordless_apis),
965964
)
966965
thirdpartypasswordless_init = thirdpartypasswordless.init(
967966
contact_config=ContactPhoneOnlyConfig(),
968967
flow_type="USER_INPUT_CODE_AND_MAGIC_LINK",
969968
providers=providers_list,
969+
email_delivery=passwordless.EmailDeliveryConfig(CustomPlessEmailService()),
970970
sms_delivery=thirdpartypasswordless.SMSDeliveryConfig(
971971
CustomPlessSMSService()
972972
),
@@ -1141,6 +1141,12 @@ async def check_role_api(
11411141
return JSONResponse({"status": "OK"})
11421142

11431143

1144+
1145+
@app.get("/hello")
1146+
async def check_role_api():
1147+
return JSONResponse({"msg": "hello world!"})
1148+
1149+
11441150
@app.exception_handler(405) # type: ignore
11451151
def f_405(_, e): # type: ignore
11461152
return PlainTextResponse("", status_code=404)

0 commit comments

Comments
 (0)