Skip to content

Commit

Permalink
Logs para pruebas de refresh token
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo3829l committed Apr 5, 2024
1 parent 969a964 commit 01f2bfb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions helpers/middlewares/JWT.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ export const requireToken = async (req, res, next) => {
export const requireRefreshToken = (req, res, next) => {
try {
console.log("Entro al refresh")
console.log("Se imprime req.cookie.refresh")
console.log(req.cookies.refreshToken)
console.log("Se imprime req.headers.cookie")
console.log(req.headers.cookie)

const cookieString = req.headers.cookie;
// Buscar y extraer la parte después de "refreshToken="
const match = cookieString.match(/refreshToken=([^;]*)/);
Expand Down

0 comments on commit 01f2bfb

Please sign in to comment.