React Native Firebase Analytics get User Country - javascript

Problem
I want to get the user's current country in React Native to find out if they're in the EU so I can display a GDPR consent form to collect personal data for advertising purposes.
I don't want to have to ask the user to allow location services as my app doesn't need to have their current location.
I have React Native Firebase installed in my app and I noticed that Analytics will tell me the users country in my console.
Does anyone know how I can access the user's country via React Native Firebase Analytics in my JS code?
If anyone has a better way to get the user's country I'm open to that as well!
Thanks in advance!

Google Analytics for Firebase automatically derives the location of the user from a number of data points, mostly from the IP address from which they connect. There is no API to get that information from Analytics.
Most applications that need this information use a similar IP-to-location lookup API to determine it, or inspect the phone settings for the user.

Related

Access user location on facebook app (React.JS)

I am building a products review app with react for a certain company. They require the user's location(country) to show suitable products to review in case users open the app on their own.
So, I only found getLocale() in instant games SDK and it's impossible for me to know the user's country through this function, only language is available. I tried react-facebook-login but there doesn't seem to be a permission that gives you location(country) either. I only found one named 'user_location'. However, I couldn't find it on the permissions to request list on facebook dashboard. I also read that I cannot use any third party library that gives me access to user's information outside facebook's sdk.
Any thoughts on how to go through this?
Thank you.

Google Picker API for Google Workspace users only

Hi, I want the users of our organization only to use google picker to select files from their google drive.
I followed this example to set up API key and oAuth client in the google developer console.
Here is the summary of what I did:
Enabled Google Picker API in Google API Console
Created API Key
Created OAuth client
Using Official Example google picker is working but it allows all Gmail users as well, I want to allow only those emails which belong to my domain.
I could not found anything related to this in official docs so I have the following questions:
Is it possible?
Is it possible to bypass the consent screen using service account impersonation(User Access Token generated on the server via impersonation)?
This is a high level explanation, but the idea is the following:
Using a server side script, you will generate a token for a user using a service account and impersonation.
On the client side, you will have to call that script on the server side and have the server return the token.
When initializing the picker, you will set the token to what you received from the server using the PickerBuilder.setOAuthToken() method.
That way you not only bypass the consent screen, but also make sure the drive picker presents the drive files of the user you authenticated with the service account.
If you are looking for a low level explanation, edit your question and post your architecture along with your code.

get google authentication token using username and password

I have been looking for an open google api to get google authentication token by using a user's google username and password. I have came across google-auth node package. And according to it, I first need to log in to create a project in google developer console and then use the key to access the information.
But I want to know whether there is any open api where I can directly pass the username and password, without creating any project in google developer console. And get the authentication token as part of response.
This is my first project using google apis, so if it sounds naive please let me know the right way of authenticating a google account user using a node project.
Sorry, I can't provide any code, as I am stuck at understanding the initial part itself, about how to authenticate different users.
Thanks in advance
You can't use google or any social login, without first creating a project and using it's api key.
That is just how oAuth is designed.

Is there REST api to associate windows 8.1 app with the store

I am trying to associate app with the store without visual studio and this is to avoid manual updating of app id, publisher id etc.. in package.appxmaifest file
(provided that I have developer account credentials I want to integrate this process in web app)
Thanks for any help in advance.
From the create and manage submissions using Windows Store services, we can see that you can use Windows Store submission API to get data for existing apps in your Dev Center account.
Please note: This API can only be used for Windows Dev Center accounts that have been given permission to use the API. This permission is being enabled to developer accounts in stages, and not all accounts have this permission enabled at this time. To request earlier access, log on to the Dev Center dashboard, click Feedback at the bottom of the dashboard, select Submission API for the feedback area, and submit your request. You'll receive an email when this permission is enabled for your account.

get the e-mail address from signed-in google maps

I am trying to add a custom control (which is basically a button-link to another inner site) in a google-map for an specific list of gmail accounts. I have a django server. So, I think I can handle this if I were able to get the gmail address from the google map. Is there a way to do this without using oAuth2.0?
This is what I have in my header
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&key=AIzaSyDCzPs4j72hd2GdajAWPyQunQVlsQcqg5o"></script>
There is no way Google will allow you to access your users information without OAuth 2.0, even if they are using Google maps from your website and signed in to their Google account. Since you have the API key for (And you have not mentioned for which API it is, I am assuming it is a G+ api key for OAuth2.0). You can follow the following steps in this link to retrieve basic user info such as email id once they have signed into your website using Google account. Refer to this link to get the user info. Specifically for Google API's client Library for Python, Please follow this link.
Hope this would help!!

Categories