billychen0894 / florist-ecommerce-app

Florist eCommerce App built with Next.js 14
https://florist-ecommerce-app.vercel.app
0 stars 0 forks source link

Feat/auth: add refresh access token interceptors on requests #38

Closed billychen0894 closed 1 year ago

billychen0894 commented 1 year ago

On every request sending to private api endpoints, it will validate whether the bearer token is valid or not. If it's valid, but expired. The interceptor will come in during the request time and refresh the bearer token and then retry the request again.