Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

143
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda