Repository navigation
Description
🐛 Bug Report
An invited console user cannot accept the invitation. The Console redirects the
invite link to /sign-in, but the invited user has no password to sign in with,
and signing up is rejected because the account already exists. The invite becomes
unusable, although the API endpoint behind it works without a session.
Steps to reproduce
- Self-hosted 2.2.0, Console image
appwrite/new:1.1.101-self-hosted. - Invite a new email address to the console organization
(Organization → Members → Invite). - Open the invite link:
https://console.example.com/join?membershipId=…&userId=…&secret=…&teamId=…
Actual
The link redirects to /sign-in?redirect=%2Fjoin%3F…, which offers Sign in and
Sign up. Neither works:
- Sign in — the account was created by the invite itself, with a randomly
generated password hash
(Memberships/Create.php):
$hash = $proofForPassword->hash($proofForPassword->generate());
Nobody knows that password, so there is nothing to sign in with. - Sign up with the same address — fails with
user_already_exists, since the
invite already created the account.
Expected
Opening the invite link confirms the membership and signs the user in, without
requiring a password — which is exactly what the API already does.
The endpoint does not need a session
PATCH /v1/teams/{teamId}/memberships/{membershipId}/status authorizes via the
secret from the link, loads the user from userId when there is no session, and
creates the session itself:
if (!$proofForToken->verify($secret, $membership->getAttribute('secret'))) {
throw new Exception(Exception::TEAM_INVALID_SECRET); // :102
}
$hasSession = !$targetUser->isEmpty(); // :110
if (!$hasSession) {
$targetUser->setAttributes($dbForProject->getDocument('users', $userId)->getArrayCopy());
}
// …
// Create session for the user if not logged in // :131Verified against a live 2.2.0 instance, no session, deliberately wrong secret:
PATCH /v1/teams/<teamId>/memberships/<membershipId>/status
header: X-Appwrite-Project: console
body: {"userId":"<userId>","secret":"<wrong>"}
→ 401 {"type":"team_invalid_secret", "version":"2.2.0"}
The request reaches the secret check, so the missing session is not the blocker —
with the correct secret it would have confirmed the membership. The Console UI
never calls it and asks for a login instead.
Environment
- Appwrite 2.2.0, self-hosted, Docker Compose
- Console image
appwrite/new:1.1.101-self-hosted
Activity
HarshMN2345 commentedon Sep 16, 2026
Thanks for checking. This is fixed in
appwrite/new:1.1.107-self-hosted. Could you update the appwrite-console image again (same as last time 😅 ) and let me know if it works?JoshiJoshiJoshi commentedon Sep 16, 2026
@HarshMN2345 Yeah, works fine. Thanks buddy!