Is it possible to execute different logins from the same smartphone?
I did it all the time and i figured out that should not be done. That’s why i get strange data and behavior. Each time i install the app, a new local database is created (or OPENED if it already exists). So i think that if i login with a user, then i logout and i login again with a different user, i mess up the local database, and also the remote database due to the pull/push replication mechanism.
Is there a way to overcome this issue or i’m forced to login always with the same user using the same smartphone?
Logging in as the same user on two devices is fine. Each device will get changes made by the other when it syncs. You will have to watch out for document conflicts, if both devices might modify the same documents, and merge them appropriately.
Sync Gateway’s user registration API is available on the admin port only, for security reasons. If you want the app to register an account, you’ll need to implement an API on your own app-server for the mobile app to call, and then have the app server use the SG admin API to create the account.