Can’t log in with different account from mobile app

On my mobile app, I’m connected to Discourse with a secondary admin account. I’d like to log out and then log back in with my Discourse ID account, but whichever way I try and do it I keep getting logged in with the secondary account.

I even removed my community from the app and added again. What am I missing?

1 Like

The accounts are matched by email address, so if guess that your discourse ID account uses the email address from your secondary admin account

1 Like

On the computer I can log in with either. I’ll check, but pretty sure they use two different emails. I just donc get a chance to choose to use my DiscourseID, it’s too efficient at getting me through the door :rofl: even when I say cancel cancel cancel when it offers to sign me in so I can access the complete log in screen…

1 Like

That’s the issue. If you want to log in with a different account, you’ll need to log out of Discourse id.

I’m not sure how to do that.

But I only have one discourse ID, for the account I’m not logged in as… :woozy_face:

The currently logged in account isn’t a DiscourseID

So you can’t use discourse ID to log in to the other account.

Heavens! I finally managed, but I’m not sure through what miracle. I logged out again. Asked to connect, and hit cancel on the screen where it asked to use my instance domain to connect. Got the login screen with various options like DiscourseID, and this time typed in my username and asked for an e-mail link. The link arrived, I clicked on it and was signed in but… in the browser, not in the app. Didn’t find a way to switch from the browser to the app. So I went back to the app login screen, which was stuck spinning (probably waiting in vain for me to arrive through the e-mail login link) – I ended up having to kill it. Opened it again, opened my community, got the usual pop-up asking for permission to connect. Cancelled, was sent back to the screen listing my communities. Tried again, finally hit “connect” as “cancel” wasn’t working, and lo and behold, it actually logged me on with the right account!

But I’m baffled. Not sure how/why it finally worked.

On the Discourse Hub app, this is indeed a tricky workflow. We are hoping to improve it soon, but I would like to acknowledge that at the moment, this isn’t easy.

First of all, the email link workflow can’t easily launch the app. The way Apple picks which app to launch from an email link is incompatible with an app like DiscourseHub, it is doable, but it is an all-or-nothing situation that doesn’t work too well for many users (for example, users that want to have the hub but not use it for every single Discourse instance they’re on).

A second issue, is that the login flow uses the Safari session, for convenience. To switch back and forth between two accounts, currently you would need to:

  • log out in Discourse Hub
  • log out of the same community/account in Safari
  • start the log in process again in DiscourseHub, when Safari is invoked, it should show you a login screen (not an already-authenticated session)

That should work. (It’s not easy for the median user, though, we need to improve this.)

1 Like

Thanks a lot for the explanation and the acknowledgement of trickiness! So, maybe when I tried the e-mail link login, as it opened in Safari, perhaps it logged me out of the other account, which then made it possible to log into the app with the right user when I tried after that?

Luckily “normal” community members are not going to be switching accounts :sweat_smile:

1 Like