You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Very unclear on what happens when you provide and ID (since it is required) but the Phone / Email already exists,
if you set the user limit to some low number and someone calls createMagicURLSession() or createPhoneSession(), but their account (match on email or phone respectively) doesn't exist, they will get an error.
You don't need to provide a matching user id when just logging in. that user id parameter is only used during account creation. Otherwise, it's ignored.
Very unclear on what happens when you provide and ID (since it is required) but the Phone / Email already exists,
if you set the user limit to some low number and someone calls
createMagicURLSession()
orcreatePhoneSession()
, but their account (match on email or phone respectively) doesn't exist, they will get an error.createMagicURLSession()
code:https://github.com/appwrite/appwrite/blob/891099c7c3dc1fe86c4e64467f9249651991b603/app/controllers/api/account.php#L920
createPhoneSession()
code:https://github.com/appwrite/appwrite/blob/891099c7c3dc1fe86c4e64467f9249651991b603/app/controllers/api/account.php#L1258
You don't need to provide a matching user id when just logging in. that user id parameter is only used during account creation. Otherwise, it's ignored.
Originally posted by @stnguyen90 in appwrite/appwrite#6154 (comment)
Proposal: documentation and minor code change
Remove the "required" tag of ID and change it to this:
USER_ID [optional] if provided and the user doesn't exist, it will be created with this ID, else it will get a new Unique ID.
EMAIL/PHONE [required]
Will return error if user limit is reached and email/phone doesn't already exist
The text was updated successfully, but these errors were encountered: