Rank 3: Container
Hello,
I have a situation where after a user signs up in my Flutter Web App I send them an email with a link to verify it. If they get their email from another device other than the one used to sign up, they won't have a session. So in this case I create an anonymous session which is needed to run the cloud function which verifies the email. Now after testing I have a bunch of anonymous users, is there a way to delete these or am i going about this the totally wrong way. Thanks!
useMemoized(() async { // Don't try to get session if initializing or authenticated if (auth == AuthStatus.initializing || auth == AuthStatus.authenticated) { return; }
try { /// Try to get session, if there is a current session then /// verify the email. await ref .read(appwriteAccountProvider) .getSession(sessionId: 'current');
await _verifyEmail(); } on AppwriteException catch (e) { debugPrint(e.message);
/// There is no session. Create anon session so we can verify email. await ref.read(appwriteAccountProvider).createAnonymousSession(); await _verifyEmail(); } }, [auth]);```