Back

Can not login using different account

  • 0
  • Android
  • Auth
  • Cloud
Sagar🌊
28 May, 2023, 12:11

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.

TL;DR
Developers are facing an issue where users cannot log in with a different account even after uninstalling the app or clearing cache. This issue is particularly seen when using OAuth providers like Google or Apple. The Appwrite team is currently investigating the problem.
safwan
28 May, 2023, 12:12

You're using google oauth right?

Sagar🌊
28 May, 2023, 12:23

Yes

Drake
28 May, 2023, 15:32

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

Drake
28 May, 2023, 15:32
Drake
28 May, 2023, 15:33

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

Sagar🌊
29 May, 2023, 03:54

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

Drake
29 May, 2023, 07:09

How'd you clear the app data?

safwan
29 May, 2023, 12:25

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.

Sagar🌊
1 Jun, 2023, 15:02

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

Sagar🌊
3 Jun, 2023, 12:27

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

Drake
3 Jun, 2023, 14:50

And you did the same with chrome?

Sagar🌊
3 Jun, 2023, 14:52

Cleared cache not data

Sagar🌊
3 Jun, 2023, 14:53

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

Drake
3 Jun, 2023, 14:58

Not really

Drake
3 Jun, 2023, 14:59

Actually, you can try to delete the previous sessions

Sagar🌊
3 Jun, 2023, 14:59

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

Drake
3 Jun, 2023, 15:25

What do you mean?

Sagar🌊
3 Jun, 2023, 15:26

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

Drake
3 Jun, 2023, 15:28

You can write whatever article you want

Sagar🌊
3 Jun, 2023, 15:29

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

RazvanTmz
9 Sep, 2024, 13:59

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

Tessa
9 Sep, 2024, 13:59

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

Sagar🌊
9 Sep, 2024, 13:59

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

Sagar🌊
9 Sep, 2024, 14:00

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.

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