
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
- Sharing Auth Provider Refresh Token
For some reason, the identities api always return empty "providerRefreshToken" property in response (in my case it is google), which make sense to not share wit...
- Change of billing cycle to support start...
Hii...is there any way to change my billing cycle from 20th to 1st...so that I aligns with my requirements.It becomes easier to track monthly usage crctly. I am...
- I am getting a 401 unauthorized response...
I have a Next.js application that stores user PDFs. I'm able to save them normally, but when trying to access the files using getFileView, I get a 401 Unauthori...
