Skip to content

Google OAuth Authentication Fails for Under-18 Accounts #1233

Open
@samuelrvg

Description

@samuelrvg

https://stackoverflow.com/questions/78889404/google-oauth-authentication-fails-for-under-18-accounts

Summary
I'm encountering issues with Google OAuth authentication for accounts where the user's age is under 18. While accounts for users aged 18 and older authenticate without problems, attempting to authenticate an under-18 account results in errors.

This issue occurs across multiple browsers.

Browser(s)/Version(s)
Opera 112.0.5197.53

Expected Behavior
All users, regardless of age, should be able to authenticate using Google Identity Services without errors. I expect the OAuth process to function consistently for both under-18 and 18+ accounts.

Actual Behavior
Users aged 18 and older can authenticate successfully. However, when attempting to authenticate an account where the user's age is under 18, the authentication fails, and the process does not complete as expected.

Steps to Reproduce
Set up the Google Identity Services client using the following HTML and JavaScript configurations:

HTML:
<script src="https://accounts.google.com/gsi/client"></script>

JavaScript:

config_CLIENT_ID = '...';

credential: string = '';

initializeGoogleApi = async () => {
  google.accounts.id.initialize({
    client_id: this.config_CLIENT_ID,
    callback: this.handleCredentialResponse
  });
}

renderGoogleButton() {
  const parent = document.getElementById('button-google-el');
  google.accounts.id.renderButton(parent, {text: 'signin_with', size: 'large'});
}

Attempt to authenticate using an account where the user's age is under 18.

Observe the error that occurs during the authentication process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions