Multiple clients each using LoginAsGuest locally share the same account

I’m noticing that when I run multiple clients, each of which performs a LoginAsGuest call this results in a message in the console from the Coherence SDK saying:

AuthClient: You have to call Logout before attempting to log in again. You're currently logged in as {UUID}

What implications does this have? I would have assumed that each client would be able to login as a seperate guest account. Note: I have seen in the documentation how this guest account is stored locally, but how does this influence communicating with the Coherence cloud services?

Hiya Kevin!

Unfortunately this scenario is not supported out of the box, the credentials are stored in disk, and when you launch several instances of the same installation, Unity will check the stored credentials from the same file path. We have no way of uniquely identifying an instance.

Currently we attempt to refresh the stored session token, which is shared across different instances, and there is no way to turn this off.

You could maybe work around this by manually logging out and logging in as a guest, but I’d discourage this.

I’ll make a ticket about this to discuss it internally, but my main advice right now would be to test using different Unity editor instances with something like ParrelSync, instead of trying to use different instances of the same installation.

1 Like

Thanks for the reply @miguel-coherence .

As you suggested, what I had originally done is detect this error and run the lgout flow, then automatically push the client back through the login flow. Seems to be working fine for my limited testing currently, but I’m not really using the accounts right now, I just need them to connect to the cloud services in each client. Will have to see how it holds up, but happy to explore other options later on if they are available.