mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(Supabase Node): Send token also via Authorization Bearer (#2814)
Send Authorization Bearer in headers Fix typo in validateCredentials function
This commit is contained in:
@@ -24,6 +24,7 @@ export async function supabaseApiRequest(this: IExecuteFunctions | IExecuteSingl
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
apikey: credentials.serviceRole,
|
||||
Authorization: 'Bearer ' + credentials.serviceRole,
|
||||
Prefer: 'return=representation',
|
||||
},
|
||||
method,
|
||||
@@ -296,7 +297,7 @@ export const buildGetQuery = (obj: IDataObject, value: IDataObject) => {
|
||||
return Object.assign(obj, { [`${value.keyName}`]: `eq.${value.keyValue}` });
|
||||
};
|
||||
|
||||
export async function validateCrendentials(
|
||||
export async function validateCredentials(
|
||||
this: ICredentialTestFunctions,
|
||||
decryptedCredentials: ICredentialDataDecryptedObject): Promise<any> { // tslint:disable-line:no-any
|
||||
|
||||
@@ -309,6 +310,7 @@ export async function validateCrendentials(
|
||||
const options: OptionsWithUri = {
|
||||
headers: {
|
||||
apikey: serviceRole,
|
||||
Authorization: 'Bearer ' + serviceRole,
|
||||
},
|
||||
method: 'GET',
|
||||
uri: `${credentials.host}/rest/v1/`,
|
||||
|
||||
Reference in New Issue
Block a user