mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
fix(core): Ensure OAuth token data is not stubbed in source control (#10302)
This commit is contained in:
@@ -1342,7 +1342,9 @@ export async function requestOAuth2(
|
||||
// if it's the first time using the credentials, get the access token and save it into the DB.
|
||||
if (
|
||||
credentials.grantType === 'clientCredentials' &&
|
||||
(oauthTokenData === undefined || Object.keys(oauthTokenData).length === 0)
|
||||
(oauthTokenData === undefined ||
|
||||
Object.keys(oauthTokenData).length === 0 ||
|
||||
oauthTokenData.access_token === '') // stub
|
||||
) {
|
||||
const { data } = await oAuthClient.credentials.getToken();
|
||||
// Find the credentials
|
||||
|
||||
Reference in New Issue
Block a user