Ad

Android Firebase SDK Github Auth

- 1 answer

I'm trying to use Firebase to authenticate github users in order to make calls to Github API.

I'm following this Firebase Guide

I'm not able to get user access token as said in docs examples.

authResult.getCredential().getAccessToken()

and then I'm not able to do the authentication

authWithGithub

getAccessToken method isn't available as you can see in the image getAccessToken

I've searched all the forums trying to find a solution, but I'm not able to.

I'm pretty new to it, so please, elaborate.

Is this github auth working? If yes, how can I proceed? If not, how can I proceed?

Ad

Answer

please use this code to get accesstoken.

((OAuthCredential)authResult.getCredential()).getAccessToken();
Ad
source: stackoverflow.com
Ad