Skip to content

Commit 1c30147

Browse files
authored
ENG-2471 - Passwordless loginIdType -> loginIdTypes (#3668)
1 parent 8c57021 commit 1c30147

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

astro/src/content/docs/apis/passwordless.mdx

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,12 @@ If you plan to utilize the FusionAuth login page then you will not need to use t
5252
<APIField name="applicationId" type="String" required>
5353
The unique Id of the Application you are requesting to log into.
5454
</APIField>
55-
<LoginIdField login_id_type_field="loginIdType" />
56-
<LoginIdTypeField />
55+
<LoginIdField login_id_type_field="loginIdTypes" footer={
56+
<span>
57+
If you are using the <a href="#send-passwordless-login">Send Passwordless Login</a> API with the code returned by this call, that API will send a message using a delivery method appropriate for the <code>loginId</code> used here. If you supplied a username or email address <code>loginId</code>, the message will be sent via email. If you supplied a phone number <code>loginId</code> then the message will be delivered via an SMS messenger.
58+
</span>
59+
} />
60+
<LoginIdTypeField plural />
5761
<APIField name="state" type="Object" optional>
5862
An optional object that will be returned un-modified when you complete the passwordless login request. This may be useful to return the user to particular state once they complete login using the passwordless code.
5963
</APIField>
@@ -77,9 +81,9 @@ _Response Codes_
7781

7882
## Send Passwordless Login
7983

80-
This API allows you to send an email to a user that will contain a code that can be used to complete login. This API should be used if you want to build your own login page.
84+
This API allows you to send an email or SMS message to a user that will contain a code that can be used to complete login. This API should be used if you want to build your own login page.
8185

82-
If you plan to utilize the FusionAuth login page then you will not need to use this API. Instead, once passwordless authentication is enabled for the FusionAuth Application, a new button will be presented to the user on the login page which will allow them to request an email.
86+
If you plan to utilize the FusionAuth login page then you will not need to use this API. Instead, once passwordless authentication is enabled for the FusionAuth Application, a new button will be presented to the user on the login page which will allow them to request an email or SMS message.
8387

8488
This API does not require authentication.
8589

@@ -89,15 +93,15 @@ This API does not require authentication.
8993
Available Since Version 1.11.0.
9094
</Aside>
9195

92-
<API method="POST" uri="/api/passwordless/send" authentication={["none"]} title="Send the provided code via email"/>
96+
<API method="POST" uri="/api/passwordless/send" authentication={["none"]} title="Send the provided code via email or SMS"/>
9397

9498
<XFusionauthTenantIdHeaderScopedOperation />
9599

96100
#### Request Body
97101

98102
<APIBlock>
99103
<APIField name="code" type="String" required since="1.11.0">
100-
The unique code to send via email, used to complete the login request. This value can be generated with a call to the [Start Passwordless Login](#start-passwordless-login) API.
104+
The unique code to send via email or SMS, used to complete the login request. This value can be generated with a call to the [Start Passwordless Login](#start-passwordless-login) API.
101105
</APIField>
102106
</APIBlock>
103107

@@ -106,7 +110,8 @@ Available Since Version 1.11.0.
106110
<API method="POST" uri="/api/passwordless/send" authentication={["none"]} title="Generate a code and send a login link via email"/>
107111

108112
<Aside type="caution" title="Deprecated usage">
109-
This usage of the API may be removed at a later date. Once available prefer the usage outlined above which is available beginning in `1.11.0` which means you will need to use the Start API prior to calling this API.
113+
* This usage of the API may be removed at a later date. Once available prefer the usage outlined above which is available beginning in `1.11.0` which means you will need to use the Start API prior to calling this API.
114+
* Passwordless login with phone numbers, introduced in version `1.99.9`, is not supported by this API. Use the [Start Passwordless Login](#start-passwordless-login) API to obtain a code and then provide that code to this API (see above).
110115
</Aside>
111116

112117
<XFusionauthTenantIdHeaderScopedOperation />

astro/src/content/json/passwordless/start-request.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"applicationId": "10000000-0000-0002-0000-000000000001",
33
"loginId": "jared@piedpiper.com",
4-
"loginIdType": "email",
4+
"loginIdTypes": ["email"],
55
"state": {
66
"client_id": "10000000-0000-0002-0000-000000000001",
77
"redirect_uri": "https://piedpiper.com/callback",

0 commit comments

Comments
 (0)