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?
please use this code to get accesstoken.
((OAuthCredential)authResult.getCredential()).getAccessToken();
Related
following this tutorial I tried to receive Access Token from my company's site but,
I also had to add headers to the POST method and since the author of the tutorial didnt, I had to do this on my own, but im super new to these things and dont know if i did it the right way. And because of that (possibly?) all i get is a 401 response here are all the files from my project : click me!
If anyone could help me, Id be greatful
I would suggest to use AppAuth-Android, and not implementing the authorization flow by yourself, which can be complicated.
AppAuth for Android is a client SDK for communicating with OAuth 2.0 and OpenID Connect providers.
AppAuth handles the authorization flow (i.e. The performActionWithFreshTokens() method handles the token refreshing automatically).
You can follow Google's AppAuth-Android codelab, which demonstrates how to implement this library.
Hope it helps!
i have to provide facebook login functionality in my react native android app but have no clue how to implement it ... i'm using firebase . i tried signInWithRedirect and signInWithPopup with no luck ... i know that those functions are for the web but what should i do ? maybe you can guide me to a way to implement fb login with firebase or any other solution possible .
if i have to implement it using java then it'S okay but i would appreciate it if you can give me a step by step solution :D
i found the solution , you should get the access token from fbsdk and pass it to the firebase
So i want to add google sign-in as the only sign-in option to my application.
I was reading this docs:
http://android-developers.blogspot.co.il/2016/05/improving-security-and-user-experience.html
http://android-developers.blogspot.co.il/2016/01/using-google-sign-in-with-your-server.html
https://developers.google.com/identity/sign-in/android/backend-auth#using-a-google-api-client-library
But all they are saying is what NOT to do, and not what we should do.
so far i was able to get the Access token using the GoogleSignInAccount.getIdToken method and succesfully authenticate it in my backend server (verifying the token against https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=)
But the docs says we should use refresh tokens and not access tokens..
Does anyone know what is the correct flow (best practice for both UX and security) to authenticate users using the refresh tokens?
Thanks in advance!
Have you looked at the FirebaseUI Auth? As stated in the github page, "FirebaseUI is an open-source library that offers simple, customizable UI bindings on top of the core Firebase SDKs. It aims to eliminate boilerplate code and promote best practices (both user experience and security) for authentication."
I am following this link to validate the token. It is mentioned in the link that for more than 100 requests we should follow below approach.
Using one of the Google API Client Libraries is the recommended way to validate Google ID tokens in a production environment.
The link provides code sample in Java. However I am trying to implement the same in Node.js. But did not find any help on this.
Can anybody help me in this?
In my android application i would like to integrate you tube.Could anyone please let me know where i can get in details use of gdata api for this.
Please let me know your valuable suggestions.
Thanks in advance
You should probably not use the GData API for this, but the newer google-api-java-client (Justification).
There are a few integration points for the integration of the authentication (AuthSub, OAuth and ClientLogin). The recommended approach is to use the AccountManager as a wrapper. Sample.
Include the resulting authentication token in calls with the YouTube Data API.