Is there a risk involved in refreshing a JWT token every time you refocus the webpage?

I am currently testing a website that appears to make a refresh token request every time I focus away from the web browser and back, or away from the tab the website is open in and back to it. I’ve confirmed these requests are refreshing m… Continue reading Is there a risk involved in refreshing a JWT token every time you refocus the webpage?

Is it bad practice or major security risk to cache decoded auth tokens in my backend?

I’ve set up a firebase passport strategy on a NestJS server which works fine, but I did not like the long load times it would incur on all requests that went through it. So I decided to cache decoded tokens until they are expired, and this… Continue reading Is it bad practice or major security risk to cache decoded auth tokens in my backend?

Is it a good practice to store both the Google Oauth2 access token and the refresh token in the database un hashed?

I recently came across a source code where they save a user’s refresh token and the access token upon sign in through Google into the database. This is done to access the Google APIs later on through the server.
My question is, isn’t this … Continue reading Is it a good practice to store both the Google Oauth2 access token and the refresh token in the database un hashed?