Skip to content

Commit

Permalink
fix(editor): Prevent duplicate creation of credential for OAuth2 (n8n…
Browse files Browse the repository at this point in the history
…-io#7163)

This PR solves the issue reported in [this
ticket](https://linear.app/n8n/issue/PAY-825/click-to-connect-for-google-sheets-does-not-work-when-cred-is-not).

Basically when trying to connect OAuth2 credentials, n8n would create
the credential twice, possibly causing transaction issues.

This PR prevents n8n from firing a duplicate creation request,
effectively fixing the bug about duplicate creation.
  • Loading branch information
cstuncsik authored and netroy committed Sep 14, 2023
1 parent a6e027b commit f6d7ffe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<button
:class="$style.googleAuthBtn"
:title="$locale.baseText('credentialEdit.oAuthButton.signInWithGoogle')"
@click.stop.prevent="$emit('click')"
:style="googleAuthButtons"
/>
</template>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div :class="$style.container">
<GoogleAuthButton v-if="isGoogleOAuthType" @click="$emit('click')" />
<GoogleAuthButton v-if="isGoogleOAuthType" @click.stop="$emit('click')" />
<n8n-button
v-else
:label="$locale.baseText('credentialEdit.oAuthButton.connectMyAccount')"
Expand Down

0 comments on commit f6d7ffe

Please sign in to comment.