fix(core): Fix oauth2 callback and add integration tests (no-changelog) (#10272)
This commit is contained in:
committed by
GitHub
parent
785c82cfec
commit
efb71dd9ad
@@ -6,7 +6,6 @@ import type { ICredentialDataDecryptedObject, IWorkflowExecuteAdditionalData } f
|
||||
import { jsonParse, ApplicationError } from 'n8n-workflow';
|
||||
|
||||
import type { CredentialsEntity } from '@db/entities/CredentialsEntity';
|
||||
import type { User } from '@db/entities/User';
|
||||
import { CredentialsRepository } from '@db/repositories/credentials.repository';
|
||||
import { SharedCredentialsRepository } from '@db/repositories/sharedCredentials.repository';
|
||||
import type { ICredentialsDb } from '@/Interfaces';
|
||||
@@ -71,8 +70,8 @@ export abstract class AbstractOAuthController {
|
||||
return credential;
|
||||
}
|
||||
|
||||
protected async getAdditionalData(user: User) {
|
||||
return await WorkflowExecuteAdditionalData.getBase(user.id);
|
||||
protected async getAdditionalData() {
|
||||
return await WorkflowExecuteAdditionalData.getBase();
|
||||
}
|
||||
|
||||
protected async getDecryptedData(
|
||||
@@ -119,7 +118,7 @@ export abstract class AbstractOAuthController {
|
||||
return await this.credentialsRepository.findOneBy({ id: credentialId });
|
||||
}
|
||||
|
||||
protected createCsrfState(credentialsId: string): [string, string] {
|
||||
createCsrfState(credentialsId: string): [string, string] {
|
||||
const token = new Csrf();
|
||||
const csrfSecret = token.secretSync();
|
||||
const state: CsrfStateParam = {
|
||||
|
||||
Reference in New Issue
Block a user