Hi, I try to build a confirmation dialog for new invited users. After they click the invitation link in the e-mail, I would like to show a confirmation box with this :
{inviterName} invited you to {teamName}. Do you accept?
But the Teams API do not allow me to fetch the pending membership for obvious security reasons. Is there a way to achieve this by using another API? Else, I can bypass this step, as the email do the same, but on a UX perspective, I think it could be good to have this confirmation inside the app.
Thank you.
I guess the inviter name is not available either. I can also use Someone invited you to {teamName}
. But as the email can show the inviter's name, I guess it's living somewhere in a pending invitation database table?
Also, new users after accepting invitation are automatically logged in, without being prompted to set a new password. I guess I can work around it by redirecting the user to the set password process, but if we could retrieve the invitation, I guess we would receive also if the user is already existing or not, so I could prompt for new password along the invitation acceptance...
Not sure it's all clear, but I can clarify if required of course.
The only way would be to use an Appwrite Function.
when the api call to invite the user is called, the email is prepared and then queued: https://github.com/appwrite/appwrite/blob/e8c74d7204258133a61db09ed518211170e751d9/app/controllers/api/teams.php#L447-L463
What's the passwordUpdate
attribute on the result of account.get()
for a user without a password? 🧐
Thank you, I was trying to avoid functions for that particuliar case, but it may be simple after all 🙂
I understand for the email, that means the inviter's name (or reference to it) is not stored anywhre so I can't rely on it.
Of course I can wait after the invitation is accepted to redirect to the set password form, or I can make my same function of above to query the userId to know if it's a user without a password and show the set password form along the invitation acceptance, I guess...
But, another question in the same topic which can helps to find the best flow for my specific case, there is a way to prevent a user from being automatically logged in once an invitation is accepted?
not really because that's how the API works
and if you don't, they wouldn't be able to do anything 🧐
Ok, I understand, thanks.
Recommended threads
- Upgrade Issue
Am having issue upgrading my appwrite account to pro as my card number is 19 and the required input is 16 digit
- Is there way to copy project (backup/res...
I think there is betterr way of fast back up / restore specified project
- Database setup
Hi everybody, I'm new to AppWrite and I need some help designing a database. I'm trying to set up a database where: 1. There are USERS 2. A USER can create an ...