This question is in the context of a web app using the Unity SDK. We want to support multiple ways to login (Facebook, Google), and my understanding is that if you do the following:
1. Authenticate with Google (for the first time).
2. While still authenticated, authenticate again with Facebook (for the first time).
Then you will have one user with both Google and Facebook merged. That may be fine if it's really the same person. But if a second person wants to play in the same browser/computer, they would want to log the first person out and get their own user account created.
So what is the proper way to log someone out before you log a new player in? I don't see anything in the documentation about logging out or unauthenticating.
Thanks!
Best Answer
C
Customer Support
said
over 6 years ago
Hi Vijay,
You can use SparkPlayer.Disconnect() to logout users. Passing in true or false dictates whether you want to logout the current session aswell.
You can use SparkPlayer.Disconnect() to logout users. Passing in true or false dictates whether you want to logout the current session aswell.
Does this answer your question?
-Pádraig
V
Vijay Myneni
said
over 6 years ago
Yes, I believe so. I'll try that, thanks!
S
Seth Gould
said
over 5 years ago
SparkPlayer.Disconnect() does not appear to be available in the Unity SDK anymore. Whenever we start the app, it automatically tries to authenticate via DeviceAuthentication it seems and we would like to stop this behavior. What is the proper way to disconnect an account within the Unity SDK or prevent it from logging in when the GameSparks singleton starts?
Vijay Myneni
Hello,
This question is in the context of a web app using the Unity SDK. We want to support multiple ways to login (Facebook, Google), and my understanding is that if you do the following:
1. Authenticate with Google (for the first time).
2. While still authenticated, authenticate again with Facebook (for the first time).
Then you will have one user with both Google and Facebook merged. That may be fine if it's really the same person. But if a second person wants to play in the same browser/computer, they would want to log the first person out and get their own user account created.
So what is the proper way to log someone out before you log a new player in? I don't see anything in the documentation about logging out or unauthenticating.
Thanks!
Hi Vijay,
You can use SparkPlayer.Disconnect() to logout users. Passing in true or false dictates whether you want to logout the current session aswell.
Does this answer your question?
-Pádraig
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstCustomer Support
Hi Vijay,
You can use SparkPlayer.Disconnect() to logout users. Passing in true or false dictates whether you want to logout the current session aswell.
Does this answer your question?
-Pádraig
Vijay Myneni
Yes, I believe so. I'll try that, thanks!
Seth Gould
SparkPlayer.Disconnect() does not appear to be available in the Unity SDK anymore. Whenever we start the app, it automatically tries to authenticate via DeviceAuthentication it seems and we would like to stop this behavior. What is the proper way to disconnect an account within the Unity SDK or prevent it from logging in when the GameSparks singleton starts?
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2487 topics