Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

142
Views
Share state between between AMP cache page and authentication page across domains

We have to implement a mechanism to protect content on our main www.oursite.com. We also have AMP pages being served from amp.oursite.com. Finally, the AMP pages are also getting served from the Google cache via https://www.google.com/amp/s/amp.oursite.com/

The mechanism that we want to implement is similar to a freewall which requires users to register and once they do, they will have access to most of the content on the website.

Registration and login happens on a subdomain such register.oursite.com.

We envisage a typical flow would be as follows:

  1. User finds a page while performing a search on their mobile device via a Google search results.
  2. They click on search result and are taken to the page on the google.com domain.
  3. A pop-up or modal window (served over register.oursite.com) appears over the page with protected content asking them to login.
  4. They login and on successful login, the pop-up or modal window disappears. (assumes user has registered at a previous point)
  5. The protected content which was hidden or blurred in the main/parent window, appears so the user can proceed to read it.

We can assume that, upon successful login, a cookie (let's say named login-status) is dropped on the user's browser, scoped to .oursite.com which could serve as a flag. The problem we are facing is that the page in the original window was served over the .google.com domain and therefore we do not expect that it would be possible for the main window to apply display logic on the content based on the cookie named as login-status.

It would appear from this page that the way to solve this challenge is via identifier reconciliation on the server by maintaining a matching table between the reader id that AMP generates and the cookie. We have looked at the AMP access feature and AMP page implementation for New York Times but we cannot tell for sure whether they have achieved this via server side or client side solution.

Can anyone

  1. validate the assumption that it is not possible somehow via AMP to share the login state of a user between 2 windows with content served over different domains?
  2. suggest a way to solve this on the client side rather than the server side?

Thanks in advance

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!