Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

137
Vistas
Use refreshtoken from subdomain A to authenticate for subdomain B in Cognito

We are using Cognito via Amplify/Auth to handle our signup. After the signup is done (on signup.foo.com) we redirect the user to the dashboard (on app.foo.com). Using localstorage, the session is locked to the domainname of signup.foo.com and not accessible at signup.foo.com.

We used cookieStorage with a *.foo.com domain, which worked, but we are having issues with the cookies disappearing on our mobile Webview solution, so I am looking at going back to the localstorage solution.

However, it seems to be impossible to carry over a session from one subdomain to the second, even if we use the same app client in Cognito.

I was able to get a new access token using the refresh token of the signup session using aws cognito-idp admin-initiate-auth via the command line, but I can't manually inject the refreshToken or accessToken in the localstorage with the correct key name. The Auth module doesn't accept it, and it probably is because the domain is hashed into the refreshtoken.

Is there an official way to, either via Node and a valid refresh or JWT token, to get a new token that can be injected into subdomain B?

Cheers,

Mattijs

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda