Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

Google Sign-In failing with popup_closed_by_user #507

Description

@josephfoulds

We're running using Google Sign-In to authenticate users to our service and have recently become aware that for a small subset of users the gapi.auth2.getAuthInstance().signIn() call is failing with popup_closed_by_user error across a range of devices (Chrome, FireFox, Safari, Safari Mobile) for users which have confirmed that they do not have third party cookies blocked (we are aware this could be causing issues).

This bug is not reproducible by us directly (since we do not know what is causing it) but we have confirmed with a number of users that they are not blocking third party cookies and have no privacy related browser plugins installed which may be interfering with the login flow.

Login snippet with error catch:

gapi.auth2
        .getAuthInstance()
        .signIn({ scope: 'profile email', prompt: 'select_account' })
        .then(
          user => {
            resolve(this.getDelegatedLoginParams(user))
          },
          err => {
            // May throw an error if the user is not allowing third party cookies
            if (!nullish((window as any).Bugsnag)) {
              Bugsnag.notify(
                '[Login Error]',
                'Login Failed',
                { gapi: err }
              )
            }
            reject(err)
          }
        )

Looking back through Github issues and Stackoverflow questions, it appears that popup_closed_by_user is a frequent issue for gapi.

Are we aware of any potential issues or remedies for this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions