mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
⚡ Automatically remove new lines from Google credentials
This commit is contained in:
@@ -87,6 +87,8 @@ function getAccessToken(this: IExecuteFunctions | IExecuteSingleFunctions | ILoa
|
||||
|
||||
const now = moment().unix();
|
||||
|
||||
const privateKey = (credentials.privateKey as string).replace(/\\n/g, '\n');
|
||||
|
||||
const signature = jwt.sign(
|
||||
{
|
||||
'iss': credentials.email as string,
|
||||
@@ -96,11 +98,11 @@ function getAccessToken(this: IExecuteFunctions | IExecuteSingleFunctions | ILoa
|
||||
'iat': now,
|
||||
'exp': now + 3600,
|
||||
},
|
||||
credentials.privateKey as string,
|
||||
privateKey as string,
|
||||
{
|
||||
algorithm: 'RS256',
|
||||
header: {
|
||||
'kid': credentials.privateKey as string,
|
||||
'kid': privateKey as string,
|
||||
'typ': 'JWT',
|
||||
'alg': 'RS256',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user