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
- Cant configure email templates
i configure it on the console, and when i send the OTP, it sends with appwrite's email (instead of custom smtp) and with the branding, but i have the Pro (educa...
- Need help with createExecution function
Hi, Need some help understanding createExecution. When requesting function execution via createExecution, the function handler arguments are incorrect and rese...
- Need Help with Google OAuth2 in Expo usi...
I'm learning React Native with Expo and trying to set up Google OAuth2 with Appwrite. I couldn't find any good docs or tutorials for this and my own attempt did...