Get google token

How do i get google id token and access token for firebase?

I need them here:

 Firebase.Auth.Credential credential =
        Firebase.Auth.GoogleAuthProvider.GetCredential(googleIdToken, googleAccessToken);

Edit:
Okey i found out that you can get token like this:

PlayGamesPlatform.Instance.GetToken();

But when i try it on my mobile phone script gets stuck at this line… help :open_mouth:

This is my solution:

First setup playgames configuration like this

PlayGamesClientConfiguration config = new PlayGamesClientConfiguration.Builder()
            .RequestIdToken()
            .Build();

PlayGamesPlatform.InitializeInstance(config);

PlayGamesPlatform.Activate();

Then login using

Social.localUser.Authenticate

Now you can get token

googleIdToken = ((PlayGamesLocalUser)Social.localUser).mPlatform.GetIdToken();

and use it to login to firebase

Credential credential =
            GoogleAuthProvider.GetCredential(googleIdToken, null);
            auth.SignInWithCredentialAsync(credential)

I hope this helps