With Google One-Tap sign in it explains you need to add googleyolo.retrieve() on the pages that require sign in for pages that need the user signed in and googleyolo.hint() for when you want to pop-up a sign-up dialogue to first-time users.
Question: Is it possible to auto-select the user even though he has multiple credentials wherever the googleyolo.retrieve() is executed?
My app saves the last user id in the cache, so the next time he opens the app, I want the app to auto choose his last used account.
From the documentation:
If the user has only one credential saved, the credential can be retrieved without user interaction, which makes completely automatic sign-in possible.
When multiple credentials are saved, the user can choose the one to use with a single tap.
I'd like to change this behaviour (the bold text) to auto choose the last user.
I'm the product manager at Google for this library. This is something we've thought about but unfortunately currently don't have plans to support. The current experience is optimized for switching between accounts, which we've found equally common as using a previously selected account. So for now, this behavior can't be changed. I'll update this answer if there is a future revision.
Related
I have an app where users need to sign-up in order to use it. The signup process can take up to a minute or so and eventually, it could fail, so the user doesn’t actually use the app.
My question is, how can I make Firebase count a user active, only after he/she has verified his/her account, so I can have proper retention analytics?
you can have a login page that when accessed triggers your analytics to report that a user has accessed the page in question, this way, you are able to track both app instances and logged-in users.
You can find the list of events and parameters here:
https://support.google.com/firebase/answer/7061705?hl=en
I recently released my quiz app in the german Play Store and I get some impressions/downloads from the US which is odd since it should not be visible to the Play Store there. I am using Firebase authentication and I also see that some users authenticate but in my database they don't have an account (username, avatar etc.) which also can't be because after you login with Google you get to a page where you can choose your username and in the second you reach to this site, a user document will be automatically created, but in some cases it does not get created.
I noticed this behavior since my app was in beta testing.
Is it a normal behavior that there are some users who can see and are able to download an app that is usually only available in one country?
It can happen because google play console generates pre-launch reports for your app, so I think they use dummy accounts to login into your application. It can also happen when you submit an update to your app and it goes through a review process.
I have implemented Firebase Auth into my app to let my users connect with their Google accounts. So far so good, however once a user has chosen to connect with a specific account from the google account chooser popup, he won't be able to choose a different account the next time he logs in. The previously selected account will be automatically picked for the authentication.
I really don't find this behavior correct, so I am trying to fix it.
After some research I found that I can use setCustomParameters(prompt: "select_account") with the googleProvider, like so:
this.googleProvider = new firebase.auth.GoogleAuthProvider();
this.googleProvider.setCustomParameters({
prompt: "select_account",
});
More info here: https://developers.google.com/identity/protocols/oauth2/openid-connect#authenticationuriparameters
In my case, using the consent and select_account parameters don't seem to have any impact, the user does not get to choose which account to use.
Edit: It would seem that it works correctly with chrome, but not with firefox...
I have found the source of the issue, it is in fact not really an issue. The google account picker will only show up if you have other accounts registered onto the device/browser you are currently using. If you want to choose a different account that is not saved into your device/browser, you would first need to log into it via google.
I created an App with the GSuite administrator account. But now when I go back I am my work user(rob) and have no access to the App I created.
If I then go to Google and switch accounts there is no issue for all other Google apps(drive, gmail etc) but Appmaker still shows me as rob.
How can I convince App Maker to work like all other Google apps and let me select the logged in user?
Most likely it happens because at this time App Maker doesn't provide users with account chooser widget like most other Google products. Here are some things to try to bypass this limitation:
use different chrome instances for better accounts separation (https://support.google.com/chrome/answer/2364824) - I would highly recommend this approach. I have about 10 different accounts and this feature saves me tons of time and gives peace of mind
use incognito window
log out from other accounts (in theory, when you open AM it will ask you to choose an account and re-login)
I am trying to see if its possible to use Firebase to show the number of active users in real time on my shopify site. I also want to show the active users on a single product page if thats possible.
I see the Firebase example code for Presence but it looks like this only works for logged in users. How do I or is it even possible to show the real time user count ignoring whether someone is logged in or not...similar to the real time google analytics count?
The Firebase presence samples (one, two, three) all rely on the Firebase onDisconnect() handling. This method allows you to specify write/delete actions that should happen to your Firebase data on the server, once it detects that the connection to a client has been lost.
A system like this can work fine with using Firebase Authentication, but you need some way to uniquely identify each user. This can be any sufficiently random identifier, or for example the uid generate by Firebase's anonymous authentication. Both serve the same goal: authentication without identifications. That last approach is somewhat similar to how many analytics services work: they give you a unique ID when they first see you and then track you by that ID.