Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Multiple Accounts are signed at the same time

I want my users to sign in with multiple accounts (Not linking multiple providers)

like gmail, it allows you to use multiple signed in accounts at the same time you can check all inboxes for all accounts at the same time

e.g. I am a User and I want to use two accounts [email protected] & [email protected]

I want both emails signed in (there are two auth tokens in this case)

I have searched about it in Firebase docs, I couldn't find anything

Is this possible in Firebase Auth?

like image 621
alma Avatar asked Feb 27 '18 21:02

alma


People also ask

Can you create a user with the same credentials in Firebase?

You can allow users to sign in to your app using multiple authentication providers by linking auth provider credentials to an existing user account. Users are identifiable by the same Firebase user ID regardless of the authentication provider they used to sign in.

How long is a Firebase user logged in for?

Firebase ID tokens are short lived and last for an hour; the refresh token can be used to retrieve new ID tokens. Refresh tokens expire only when one of the following occurs: The user is deleted. The user is disabled.


1 Answers

From one project, no i don't think you can have two users signed in.

You can create another Firebase project and add your app there (you'll be able to add your sha-1 on either one). You can then look up their approach to using two Firebase projects in one app.

You'll be able to sign in with two users in this way if there are two projects to sign in with. You'll have to manage your users across both the databases on your own i.e same user will have to have an account with same credentials made in both the projects.

It's complicated but it can be done. I use anonymous sign in from two separate projects simultaneously in my app, both users are the same... Just their projects are different.

like image 184
Kushan Avatar answered Oct 13 '22 01:10

Kushan