-
Notifications
You must be signed in to change notification settings - Fork 298
Description
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.
createMagicURLSession() code:
createPhoneSession() code:
it's impossible to provide the matching [USER_ID]
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