frontegg / frontegg-nextjs

MIT License
7 stars 3 forks source link

FR-17841- [NextJS] `/refresh` endpoint fails with 400 after switching tenant #367

Closed vladFrontegg closed 1 month ago

vladFrontegg commented 1 month ago

FR-17841 - /refresh endpoint fails with 400 after switching tenant

When we request a new authorization token, there is no sense to send the old one in the headers and everything works without it And it was causing an error that wouldn't let you switch between tennants. Authorization token can be large due to the large number of permissions etc(about 6k chars) and we went over the limits of maximum allowed size of HTTP headers(16k on our side)

Changes:

Before: https://github.com/user-attachments/assets/fed35f3b-7a63-49fd-b699-f60b280c0dc1

After: https://github.com/user-attachments/assets/a6541d5d-67e2-4516-b1a8-79d3f3a8bcf1