We use Firebase Auth in our Unity game and Google SignIn and need to access Google services like Google Classroom.
Firebase Auth gives us a JWT IdToken after signing in using this code https://firebase.google.com/docs/auth/admin/verify-id-tokens#unity
Firebase.Auth.FirebaseUser newUser = task2.Result;
var token = await newUser.TokenAsync(false);
I tried passing this token to Google Classroom service but it requires an OAuth2 AccessToken.
How I convert this JWT Firebase IdToken to an AccessToken that can be used by the GoogleClassroom API?
I am looking for the AccessToken to pass to the Google Classroom APIs
var credential = GoogleCredential.FromAccessToken(AccessToken);
var service = new ClassroomService(new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = ApplicationName,
});
I have tried the answer to this question but the service is returning 404.