hoping some can help me.
I am using Oauth to authenticate users using their google credentials to grant access to an emmbeded iframe of LookerStudio in my web. Everything is working fine except, when a certain user has 2 google accounts. Scenario:
- personal google account [email protected] is actively logged in, as the user visits their gmail account.
- my web account [email protected] needs to be used when logging in my web.
- The user gets the different account prompts, logs with mail2 succesfully and is redirected to the corresponding page with the iframe, looker loads correctly but takes mail1 as the active account.
- In other words, the redirect uri does not take the oauth user logged in, but the previous logged in user in the browser.
Everything works fine in a private window.
My code:
<script src="https://accounts.google.com/gsi/client" async defer></script>
<div id="g_id_onload"
data-client_id="MY-CLIENT_ID"
data-context="use"
data-ux_mode="redirect"
data-nonce=""
data-prompt="select_account consent"
data-login_uri="MY-REDIRECT-URI"
data-itp_support="true"
data-auto_prompt="false">
</div>
<div class="g_id_signin"
data-type="standard"
data-shape="rectangular"
data-theme="outline"
data-text="signin"
data-size="large"
data-locale="en-GB"
data-logo_alignment="center"
data-width="400">
</div>
I have tried using different browsers, different computers. It replicates. The only way I found is log out before everything, which is not user friendly.
I have searched forums but I cant find very seldom related posts, which brings me to the conclussion I am doing something wrong, as I understand this should be a relatively common situation.
I expect to be able to understand what I am doing wrong, and hopefully be able to specify the URI to use the ouath logged in account, instead of the previously logged in.
Thanks in advance!
juaorpo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.