Parse single-line private key for Google service account (#2132)

*  Parse single-line private key

* ✏️ Update description and placeholder

*  Some improvements

Co-authored-by: Jan Oberhauser <janober@users.noreply.github.com>
Co-authored-by: Jan Oberhauser <jan.oberhauser@gmail.com>
This commit is contained in:
Iván Ovejero
2021-12-24 16:12:18 +01:00
committed by GitHub
parent 231c760ef5
commit 26eac80d49
9 changed files with 93 additions and 29 deletions

View File

@@ -29,6 +29,7 @@ import {
getAccessToken,
googleApiRequest,
hexToRgb,
IGoogleAuthCredentials,
} from './GenericFunctions';
export class GoogleSheets implements INodeType {
@@ -1018,7 +1019,7 @@ export class GoogleSheets implements INodeType {
credentialTest: {
async googleApiCredentialTest(this: ICredentialTestFunctions, credential: ICredentialsDecrypted): Promise<NodeCredentialTestResult> {
try {
const tokenRequest = await getAccessToken.call(this, credential.data!);
const tokenRequest = await getAccessToken.call(this, credential.data! as unknown as IGoogleAuthCredentials);
if (!tokenRequest.access_token) {
return {
status: 'Error',