fix(core-components): decode url-safe base64 tokens in proxy sign-in
The proxy-based sign-in page derived the session expiry from the JWT by decoding its payload with `window.atob`, which only accepts the standard base64 alphabet. JWTs are encoded using base64url (RFC 7515), so any token whose payload contained '-' or '_' raised a decoding error and broke sign-in. Translate the payload back to the standard alphabet and restore its padding before decoding. Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Fixed the proxy-based sign-in page failing to read the session token when the proxy issues a token whose payload is encoded using the URL-safe base64 alphabet. Such tokens are now decoded correctly so sign-in no longer breaks.
|
||||
Reference in New Issue
Block a user