-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded. #6492
Comments
we see the same issue with the special character ł in the lastname of the user |
possible duplicate of #6476 |
This issue requires attention from the MSAL.js team and has not seen activity in 5 days. @hectormmg please follow up. |
in commit 2ef47fe , some code are missing. microsoft-authentication-library-for-js/lib/msal-browser/src/encode/Base64Decode.ts Line 24 in b69ed83
should be as follows const binString = atob(base64String.replace(/-/g, "+").replace(/_/g, "/")); |
Addresses base64 decoding errors reported by customers and #6492
This has been fixed in 3.2.0 |
@fredliex you are a life saver... |
Are there different rollout phases for this bugfix?
|
This is a client library, not a service, there is no "rollout". Your application or whatever is invoking MSAL.js will need to install and deploy the latest version with the fix. |
OK, sorry I missed to reference some circumstances. |
Hi,
Try this solution, it should work.
#6492
const binString = atob(base64String.replace(/-/g, "+").replace(/_/g, "/"));
Best Regarding,
Mohan Palanisamy
…On Mon, Nov 27, 2023 at 1:35 PM Maik Lüdeke ***@***.***> wrote:
Are there different rollout phases for this bugfix?
In the AzureEU Cloud I still get the same error, when I try to add a
password to my gateway.
Uncaught (in promise) DOMException: Failed to execute 'atob' on 'Window':
The string to be decoded is not correctly encoded.
—
Reply to this email directly, view it on GitHub
<#6492 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC5SW7KK6LJEVIBUB54XH43YGRCVTAVCNFSM6AAAAAA44YVHSCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRXGMZDKMZTG4>
.
You are receiving this because you commented.Message ID:
<AzureAD/microsoft-authentication-library-for-js/issues/6492/1827325337@
github.com>
|
I am sorry, my problem is solved. The error was, that I installed the "standard Gateway" not the "personal Gateway". |
Core Library
MSAL.js (@azure/msal-browser)
Core Library Version
?
Wrapper Library
MSAL Angular (@azure/msal-angular)
Wrapper Library Version
3.0.4
Public or Confidential Client?
Public
Description
When having special characters in the displayName like my tester special charactersčćęèéêëėįìíîï msal throws an error "Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded."
After this error I'm getting:
ClientAuthError: token_parsing_error: Token cannot be parsed. Please review stack trace to determine root cause. Failed with error: InvalidCharacterError: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
Error Message
DOMException: Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.
Msal Logs
No response
MSAL Configuration
Relevant Code Snippets
Reproduction Steps
Set display name to my tester special charactersčćęèéêëėįìíîï
Expected Behavior
no error, should decode correctly
Identity Provider
Azure B2C Custom Policy
Browsers Affected (Select all that apply)
Chrome
Regression
No response
Source
External (Customer)
The text was updated successfully, but these errors were encountered: