I want to use Google Pay in a Firebase web app. The user signs in to a Google account in the app. I have tested the example code from Google Developers for this. It seems to work fine.
Except when I sign out from the Firebase app. Then the Google Pay code still seems to work. Obviously now using the account I have signed in to Google Chrome with.
So I do not know for sure which user Google Pay sees. I can test a bit, but I need to be sure. How is this supposed to work? Where is it documented?
It doesn't matter how the web application is hosted (Firebase or otherwise), Google Pay will launch in the context of the currently logged in Google user.
One way to verify is to visit https://pay.google.com/. It will show you payment details of the currently logged in user.
EDIT: Responding with clarifications (apologies for the length)
I want to use Google Pay in a Firebase web app.
Assume that I in this case is you the developer.
Except when I sign out from the Firebase app.
Assume that I in this case is you the user, signing out of the web application and not the Firebase console.
The user signs in to a Google account in the app.
The web app uses a Google identity to authenticate the user - correct?
It seems to work fine.
Except when I sign out from the Firebase app. Then the Google Pay code still seems to work.
Is the scenario that you are describing the following?
If so, then:
From my perspective, this is working as intended.
The web application's session is separate from the Google session, think of it as the web application using Google to bootstrap its own session. Once bootstrapped, they are disconnected from one another.
The user could sign out of Google after bootstrapping and that shouldn't affect the web application. If the user logs into Google as different user, they will receive a different Google Pay profile, and they should be able to fulfill payment with the second Google identity's details despite signing into the web application as the first Google identity.
You should be able to verify this behavior by visiting https://pay.google.com/ after signing out of the web app, then again after signing out of Google, and then signing in again with a different identity.