
My login and getting the user data is working fine. I first logged in using my primary google account and got its user data. Later on, I cleared the app data and tried to login using different account but again got the primary account data. Even on Appwrite cloud there is only one account present. I tried doing this multiple times and from different accounts but still getting the data of primary account.

You're using google oauth right?

Yes

I believe your browser already remembers you selected Google so it just proceeds. This is actually a feature of oauth2 😆


You can try clearing the cookies you have with the oauth2 provider and/or removing Appwrite as an oauth2 connection in the oauth2 provider

I don't think so, every time It shows me the option to choose account.

How'd you clear the app data?

Ah yes. I faced this issue before. The thing is, in a real world scenario, people don't login and logout in short intervals. And I think if you try to use oauth2 after a certain amount of time, it shows the list of accounts, and you can re-select a different one.

From system(going to app data->clear data /cache)

Is this issue solvable?😭 I wanna write an article for it

And you did the same with chrome?

Cleared cache not data

A general user isn't going to do this. Isn't there anything we can do programmatically?

Not really

Actually, you can try to delete the previous sessions

So, is it good if I write only the existing stuff? Not sure, it can annoy some android users.

What do you mean?

If I post an article for the Appwrite Auth in android...

You can write whatever article you want

I was worried that it would look incomplete without "different accounts login" functionality.

and the biggest problem, is that it sees an active session, but it doesnt restore it

Actually it is the opposite case. I’m sitting in-person with engineering team and they are working on improving login experience/fixing issues

I think while logging out we should also use GoogleSingnInClient class in android that is responsible for storing the login session for apps

Yes, when I was working on it, it wasn't able to restore it, probably bcz Appwrite logged out but Google in-device client isn't.
Recommended threads
- Authentication and Sign-In Functionality
when i am trying to find the accounts.read permission in the api permissions it dosent show Go to "API Keys" in the left sidebar 4. Find the API key that matc...
- create subdomain for function
I have deployed my react project on Appwrite using Sites feature. I have added custom DNS on namecheap. I want to create new sub domains for my functions on Ap...
- Domain Verification failed
I think i did the step by step well but just not work. When I enter the page I have this error: `Requested host does not match any Subject Alternative Names (S...
