firebase / firebase/quickstart-nodejs

refresh session cookies

Abierto
#194 3 comentarios 8 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
933
Forks
425
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I would like to set the session lifetime for the client to 6 hours. And if the user logged in and did not take any action during this time, then log out him and redirect him to the login page. But if the user has been making requests to the server with a valid token for 6 hours, I would like to update this token and start the token lifetime again.

If I follow the instructions according to the firebase session cookies documentation found here https://firebase.google.com/docs/auth/admin/manage-cookies?hl=en

I can generate the session token on the server in exchange for a idToken and return the session ID to the client as a cookie. And after that we only use the session token between client and server as cookie, We can also check if the session has expired using verifySessionCookie.

but i can't figure out a way of refreshing the session cookie without telling the user to sign in again.
could you help me understand how this can be implemented?

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start with the linked Firebase session cookies documentation and the repository's existing server/client authentication entry points; no specific files or tests are named in the issue. Define how valid activity should extend the session, how inactivity should log the user out, and how the login redirect should be verified before considering the work complete.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
firebase, javascript
Área
authentication
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
20/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.