mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-14 23:33:19 +00:00
trimLeft on gsuite key
This commit is contained in:
@@ -86,7 +86,7 @@ export class ConfigCommand {
|
||||
|
||||
private async setGSuiteKey(key: string) {
|
||||
await this.loadConfig();
|
||||
this.gsuite.privateKey = key;
|
||||
this.gsuite.privateKey = key != null ? key.trimLeft() : null;
|
||||
await this.saveConfig();
|
||||
}
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@ export class GSuiteDirectoryService extends BaseDirectoryService implements Dire
|
||||
|
||||
this.client = new google.auth.JWT({
|
||||
email: this.dirConfig.clientEmail,
|
||||
key: this.dirConfig.privateKey,
|
||||
key: this.dirConfig.privateKey != null ? this.dirConfig.privateKey.trimLeft() : null,
|
||||
subject: this.dirConfig.adminUser,
|
||||
scopes: [
|
||||
'https://www.googleapis.com/auth/admin.directory.user.readonly',
|
||||
|
||||
Reference in New Issue
Block a user