Skip to content

fix: add cross-domain cookie navigation for UK/regional users#178

Closed
Jah-yee wants to merge 2 commits intoteng-lin:mainfrom
Jah-yee:fix/uk-regional-cookies
Closed

fix: add cross-domain cookie navigation for UK/regional users#178
Jah-yee wants to merge 2 commits intoteng-lin:mainfrom
Jah-yee:fix/uk-regional-cookies

Conversation

@Jah-yee
Copy link

@Jah-yee Jah-yee commented Mar 10, 2026

Description

After login, navigate to accounts.google.com and myaccount.google.com to ensure .google.com cookies are set (not just regional variants like .google.co.uk). This fixes authentication failures for users in the UK and other regions where Google's login flow sets cookies on regional domains that notebooklm.google.com rejects.

Fix

  • Added cross-domain navigation after user presses Enter in login flow
  • Navigates to accounts.google.com → myaccount.google.com → notebooklm.google.com
  • This triggers Google's cross-domain cookie propagation
  • Failures are logged at debug level so they don't block login

Testing

This fix addresses the issue described in #146 where UK users get cookies on .google.co.uk that notebooklm.google.com rejects.

Closes #146

After login, navigate to accounts.google.com and myaccount.google.com
to ensure .google.com cookies are set (not just regional variants like
.google.co.uk). This fixes authentication failures for users in the UK
and other regions where Google's login flow sets cookies on regional
domains that notebooklm.google.com rejects.

Fixes teng-lin#146
@gemini-code-assist
Copy link

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical authentication issue affecting users in specific geographical regions, such as the UK. By introducing a series of post-login navigations, it ensures that the necessary .google.com cookies are correctly propagated across domains, thereby resolving instances where regional domain cookies (e.g., .google.co.uk) were not recognized by notebooklm.google.com. This change significantly improves the login experience and accessibility for a segment of the user base.

Highlights

  • Authentication Fix for Regional Users: Implemented a solution to resolve authentication failures experienced by users in the UK and other regions, where Google's login flow sets cookies on regional domains that notebooklm.google.com previously rejected.
  • Cross-Domain Cookie Navigation: Introduced a sequence of navigations to accounts.google.com, myaccount.google.com, and then back to notebooklm.google.com immediately after a user logs in, to trigger Google's cross-domain cookie propagation mechanism.
  • Error Handling: Ensured that any failures during the cross-domain cookie navigation process are caught and logged at a debug level, preventing them from blocking the user's login flow.
Changelog
  • src/notebooklm/cli/session.py
    • Added logic to perform cross-domain navigation after user login to ensure proper cookie setting.
    • Included error handling for the navigation process, logging failures at debug level.
Activity
  • No specific activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a helpful fix for users in regions with country-specific Google domains by navigating to global Google domains to set the correct cookies. The implementation is sound. I have two suggestions to improve the code: one for adhering to the project's logging style, and another to refactor the navigation logic for better maintainability.

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@teng-lin
Copy link
Owner

Thanks for the contribution here — really appreciate you taking the time to investigate and propose a fix for the regional cookie issue. We already have an earlier PR open for the same problem in #151, so I’m going to close this one as a duplicate to keep the discussion in one place. Thanks again for the help.

@teng-lin teng-lin closed this Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Login fails for UK/regional users: cookies set on .google.co.uk instead of .google.com

2 participants