-
Notifications
You must be signed in to change notification settings - Fork 429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I login again with Same Anonymous Account #1320
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
Hi, If you call SignInAnonymously without signing out, it will give you the same anonymous credentials as the last time, as the auth token is cached locally on the device. If you sign out, the device will delete its locally cached credentials, so there is no way for it to get back the anonymous login. That's why you get a brand new anonymous login the next time you sign in. I would suggest not calling auth.SignOut() when the app exits; this will leave the auth session active, even if the user is offline next time. Note: If you are creating an anonymous account to help users store data before logging in, you may want to consider prompting them to link an auth provider (like email, Google signin, etc). This will ensure that even if they signs out, they won't lose the database items associated with their login. |
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
I have two Login Options.
1: Login with Google
2: Login as Guest
I am following this
https://firebase.google.com/docs/auth/unity/anonymous-auth
for login as anonymously.
On login success It creates a unique user ID (That's a correct behaviour).
But when I Logout using
auth.SignOut(); (firebase Auth method).
and then for a reason I want to login as guest again It creates new user ID all the way.
Is there anyway to get my old Authenticated data (with old USERID). Because based on this user ID I am saving some data in firebase database.
Assigning new userid always is not good for my game requirements.
Login with Google (use firebase) is good. It always return FirebaseUser with same USERID.
The text was updated successfully, but these errors were encountered: