firebase / quickstart-unity

Firebase Quickstart Samples for Unity
https://firebase.google.com/games
Apache License 2.0
834 stars 428 forks source link

[Question] Auth documentation is missing words #1097

Open Nyankoo opened 3 years ago

Nyankoo commented 3 years ago

[REQUIRED] Please fill in the following fields:

[REQUIRED] Please describe the question here:

It seems that the documentation is missing words in this segment: https://firebase.google.com/docs/auth/unity/anonymous-auth#convert-an-anonymous-account-to-a-permanent-account

When the user signs up, complete the sign-in flow for the user's authentication provider up to, but not including, calling one of the methods. For example, get the user's Google ID token, Facebook access token, or email address and password.

What methods are referred to here?

Get an for the new authentication provider:

"Get an" what?

Pass the object to the sign-in user's method:

No method specified after the double-points.

If the call to succeeds, the user's new account can access the anonymous account's Firebase data.

"Call to" what?

Details on the context would be greatly appreciated!

catman-19 commented 3 years ago

Hi @Nyankoo, thanks for catching this! The documentation on Unity Anonymous Authentication does seem to be missing some words. While we work on fixing this, you may refer to the steps here as it's the same technique used to link two accounts (also mentioned on the note in the doc).

Let me know if you have other questions.

catman-19 commented 3 years ago

Internal bug for fixing the doc: b/194287739

Nyankoo commented 3 years ago

@catman-19 Thank you for the update!

The linked doc regarding linking two accounts, it seems the code snippet below the line The call to LinkWithCredentialAsync will fail if the credentials are already linked to another user account. In this situation, you must handle merging the accounts and associated data as appropriate for your app: is not correct, too.

The line mentions that we need to handle the situation when LinkWithCredentialAsync fails, but I believe the snippet shows merging the old data after the link was successful.

I hope that the fixed docs go live soon, as I'm currently have an issue where some users lose their progress after converting an anonymous account to a linked one. I was hoping to double-check my implementation with the one in the docs, and the "link two accounts" docs doesn't seem to help here.

Nyankoo commented 2 years ago

@catman-19 @chkuang-g Any update on this? Almost 6 months and the documentation still hasn't updated.