Skip to content

Commit dc73f87

Browse files
committed
Add 1.8.x support
1 parent d48705e commit dc73f87

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

appwrite/services/account.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,14 +1370,15 @@ def update_status(self) -> Dict[str, Any]:
13701370

13711371
def create_email_token(self, user_id: str, email: str, phrase: bool = None) -> Dict[str, Any]:
13721372
"""
1373-
Sends the user an email with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.
1373+
Sends the user an email with a secret key for creating a session. If the email address has never been used, a **new account is created** using the provided `userId`. Otherwise, if the email address is already attached to an account, the **user ID is ignored**. Then, the user will receive an email with the one-time password. Use the returned user ID and secret and submit a request to the [POST /v1/account/sessions/token](https://appwrite.io/docs/references/cloud/client-web/account#createSession) endpoint to complete the login process. The secret sent to the user's email is valid for 15 minutes.
13741374
13751375
A user is limited to 10 active sessions at a time by default. [Learn more about session limits](https://appwrite.io/docs/authentication-security#limits).
1376+
13761377
13771378
Parameters
13781379
----------
13791380
user_id : str
1380-
User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1381+
User ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.
13811382
email : str
13821383
User email.
13831384
phrase : bool
@@ -1421,7 +1422,7 @@ def create_magic_url_token(self, user_id: str, email: str, url: str = None, phra
14211422
Parameters
14221423
----------
14231424
user_id : str
1424-
Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1425+
Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the email address has never been used, a new account is created using the provided userId. Otherwise, if the email address is already attached to an account, the user ID is ignored.
14251426
email : str
14261427
User email.
14271428
url : str
@@ -1511,7 +1512,7 @@ def create_phone_token(self, user_id: str, phone: str) -> Dict[str, Any]:
15111512
Parameters
15121513
----------
15131514
user_id : str
1514-
Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
1515+
Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars. If the phone number has never been used, a new account is created using the provided userId. Otherwise, if the phone number is already attached to an account, the user ID is ignored.
15151516
phone : str
15161517
Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.
15171518

0 commit comments

Comments
 (0)