I wrote some codes to build web app using Google SignIn.
First, initiallize API platform,
gAuth = gapi.auth2.init( {
client_id: gAuthClientId,
fetch_basic_profile: false,
scope: gAuthScope
} );
and make user to sign in.
gAuth.signIn({
prompt: 'none'
});
In this code, I want to skip auth popup for (already) signed in user, and I follow the reference in developer document:
prompt: Specifies whether to prompt the user for re-authentication. See OpenID Connect Request Parameters. Optional.
and parameter document which is shown in document above.
prompt
OPTIONAL. Space-delimited, case-sensitive list of ASCII string values that specifies whether the Authorization Server prompts the End-User for reauthentication and consent. The defined values are:
none
The Authorization Server MUST NOT display any authentication or consent user interface pages. An error is returned if an End-User is not already authenticated or the Client does not have pre-configured consent for the requested Claims or does not fulfill other conditions for processing the request. The error code will typically be login_required, interaction_required. This can be used as a method to check for existing authentication and/or consent.
but it doesn't works well. Actually, for signed in user, the API shows empty popup once, and closes it immediately. When I do this phase automatically, it was blocked browser.
Why does it happen? What shoud I do to avoid popup for signed in users?