There is an issue where we do not pass the cookies (i.e. delete the cookies from postman) and only pass the refreshToken in body it will try to assign the token to cookie variable, but that variable is constant so the code throws the below error:
TypeError: Assignment to constant variable.
Error thrown here:
refreshCookie = refreshToken
Here is a PR for the bug fix: Bug fix when assigning refreshToken from body to a constant by umair-me · Pull Request #1 · Marienoir/Strapi-Refresh-Token-v4 · GitHub