mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix account names to display UTF8 characters (#21070)
This commit is contained in:
@@ -642,7 +642,7 @@ export abstract class AzureAuth implements vscode.Disposable {
|
|||||||
protected getTokenClaims(accessToken: string): TokenClaims {
|
protected getTokenClaims(accessToken: string): TokenClaims {
|
||||||
try {
|
try {
|
||||||
const split = accessToken.split('.');
|
const split = accessToken.split('.');
|
||||||
return JSON.parse(Buffer.from(split[1], 'base64').toString('binary'));
|
return JSON.parse(Buffer.from(split[1], 'base64').toString('UTF8'));
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
throw new Error('Unable to read token claims: ' + JSON.stringify(ex));
|
throw new Error('Unable to read token claims: ' + JSON.stringify(ex));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user