1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-15 07:43:27 +00:00

trimLeft on gsuite key

This commit is contained in:
Kyle Spearrin
2019-06-07 11:21:55 -04:00
parent a06212af1a
commit e7b988c042
2 changed files with 2 additions and 2 deletions

View File

@@ -86,7 +86,7 @@ export class ConfigCommand {
private async setGSuiteKey(key: string) { private async setGSuiteKey(key: string) {
await this.loadConfig(); await this.loadConfig();
this.gsuite.privateKey = key; this.gsuite.privateKey = key != null ? key.trimLeft() : null;
await this.saveConfig(); await this.saveConfig();
} }

View File

@@ -224,7 +224,7 @@ export class GSuiteDirectoryService extends BaseDirectoryService implements Dire
this.client = new google.auth.JWT({ this.client = new google.auth.JWT({
email: this.dirConfig.clientEmail, email: this.dirConfig.clientEmail,
key: this.dirConfig.privateKey, key: this.dirConfig.privateKey != null ? this.dirConfig.privateKey.trimLeft() : null,
subject: this.dirConfig.adminUser, subject: this.dirConfig.adminUser,
scopes: [ scopes: [
'https://www.googleapis.com/auth/admin.directory.user.readonly', 'https://www.googleapis.com/auth/admin.directory.user.readonly',