#Access the accessToken in getServerSideProps
3 messages · Page 1 of 1 (latest)
Why not just store the accesstoken in a cookie as well, it will get automatically sent by the browser. additionally localstorage doesnt provide any securiry, ideally you would store your AT in an httpOnly cookie as well
you could access the authorization header in getServerSideProps as well as do res.setHeader if needed, but I recommend entertaining the idea of storing the AT in an httpOnly cookie as well