Firebase Auth Anonymous Login

前端 未结 3 2428
囚心锁ツ
囚心锁ツ 2020-12-24 14:11

When using Firebase Auth Anonymous Account it occasionally creates a new UserID in the system and sometimes it uses the same UserID. I really want this to create the same Us

3条回答
  •  再見小時候
    2020-12-24 14:40

    You can use the Custom Auth System. Since the "Play as Guest" will only be specified for a special device. You can use Device ID as the CustomToken and then call Firebase Authentication Method:

    auth.SignInWithCustomTokenAsync(custom_token).ContinueWith{.......
    

    You can provide "custom_token" as the Device ID. You can get Device ID by:

    string deviceID = SystemInfo.deviceUniqueIdentifier;
    

    Hope this helps...

提交回复
热议问题