Firebase Auth and Google Calendar Creation - firebase

Is it possible to use Firebase Authentication, to authenticate my iOS/Web/Android users to my platform, and then for each user to create a google calendar and sync them with the rest of the users through Firebase?
This is the first time that I'm dealing with something like this and I'm honestly confused, the documentation on the API's hasn't helped me thus far.

You may want to check this thread wherein it was stated that:
There is no way to currently do this with the current SDKs that I am aware of, unless you roll your own Google OAuth flow using custom authentication.
Reading through it, one encountered problem is with the access_token.
When login to Firebase using Google credentials, it gives you back the Google access_token, which is great. Unfortunately, that token only last for an hour and you're NOT given a refresh token, which means while your app is still authenticated against Firebase after an hour you can no longer access the Google APIs without forcing the user to login again.
As a workaround, you can try handling the authentication outside Firebase
using standalone Auth client which can be loaded with the JavaScript client's load function:
<script src="https://apis.google.com/js/api.js" type="text/javascript"></script>
<script type="text/javascript">
gapi.load('auth2', init);
</script>
Then, manually handle the Firebase sign-in flow as discussed in this Firebase documentation.
Lastly, see this SO post for additional insights.

Related

Is there a way to get idToken of an user from Firebase Console?

Im developing a backend for mobile which is using Firebase for authentication and authorization. When the mobile ends the authentication process it sends through http methods to my backend an idToken signed by Google, which then I verify the signature and payload of the provided idtoken.
Is there a way to get the idToken from Google Firebase Console?
At the time I only figured out how to get it from mobile through a method called getIdToken for Kotlin. I can't keep getting the token this way, I need to do it without the mobile.
Thanks!
There is no server-side API to get ID tokens of your users from Firebase Authentication. You will have to get it on the client, and pass it to your server to be verified, exactly as you already seem to be doing.
That is also the process that the Firebase services and SDKs themselves follow, so you might want to reconsider whether this is feasible for your use-case too, or edit your question to better explain why it isn't possible.

How do I connect my Firebase database to a Google script?

I am trying to put pictures that are on Firebase into a google Drive by using google App script. I've no code, I only tried reading the documentation, but it seems to be deprecated. There seems to be a way to use an Oauth token but I could not find a token on my firebase database.
I go into a lot of detail about using OAuth2 and service accounts with Google Apps Script in this story on Medium.
I suppose you want to use Firebase storage? The approach should be similar:
Create a service account
Use the OAuth2 library to generate a Bearer token
Use that token with the API call via UrlFetchApp
It would help if you shared more details on what you're trying to achieve, but this should set you on the right track.

Firebase user tracking when signing in

I am completely new to Firebase, We currently have auth0 set up for our app authentication.
We use firebase analytics for user tracking, What we found was that when we are tracking users we lose the user jounrey when they come to sign in to our app, because we have no way of integrating firebase with auth0.
For instance when a user comes froma facebook campaign... we can track all the way to the sign in but we then lose the information and cannot track any longer. This seems to be an issue with Auth0..
Can Firebase handle this.. id assume it can becuase its part of its service?

Firebase - Getting OAuth Credentials to REST Auth

I'm working on a project where it was asked for all the authentication to be done in our own backend, that is, without the usage of the Firebase SDK that comes pretty handy. The email/password sign up/sign in are very easy as we pass the email and password but all the other authentication methods, such as Google and Facebook, require postBody which contains OAuth Credentials. How am I able to get that data from the client (which can either be a native app or a react web page)? I've googled and read the Firebase REST Auth page for more info but I didn't find much other than what I already know. I've tried to work around with OAuth Playground from Google but it didn't work as well so I thought that my best chance was asking on SO where people with more experience could answer me.

App is not verified when using Google Provider in firebase login

I used firebase.auth.signInWithPopup() from this documentation. However, I am getting this warning on the popup window saying that my app isn't verified yet. See image below.
I don't know where to start from here since as far as I can remember, I can't find anything about this on the firebase auth docs. Any advice?
Google now requires apps be verified when you request certain sensitive data:
https://developers.googleblog.com/2017/07/new-security-protections-to-reduce-risk.html
Firebase is not exempt. Why should it be? Any attacker can create a Firebase account with Google provider enabled and try to phish Google users with it.
Verify your app through this link OAuth consent screen

Resources