Skip to content
Back

Two steps signIn with one user:

  • 0
  • Flutter
  • Auth
Sharpen
14 Oct, 2025, 01:24

'm using appwrite to try two phase login, step 1: await account.createAnonymousSession(); or final appwriteUser = await account.create( userId: ID.unique(), email: _testEmail, password: _testPassword, name: 'Test User' ); await account.createEmailPasswordSession(email: _testEmail, password: _testPassword); to create a trail user and autologin for limited trail purpose, if user want to upgrade account, I used await account.createOAuth2Session(provider: provider); to upgrade trail user to free/premium user, but I got two users and not linked with identities. Whats the wrong with me? I need to two step login with one user.

TL;DR
To achieve two-step login with one user using Appwrite: 1. Use `account.createEmailPasswordSession(email: _testEmail, password: _testPassword)` to create a trial user and enable auto-login. 2. For upgrading the trial user to free/premium, utilize `account.createOAuth2Session(provider: provider)`. 3. Ensure users are linked with identities correctly to avoid the issue of having two separate users. Check your implementation to correct any mistakes and make sure the identities are properly linked for a seamless two-step login process with a single user.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more