vue-google-login icon indicating copy to clipboard operation
vue-google-login copied to clipboard

Button fails to render after users signs out

Open tomklino opened this issue 3 years ago • 0 comments

I have a login button integrated within a dialog, this will show up with options to login, the google sign in button is one of them.

I also have the sign-out button, the will only appear if the user is signed in with google.

After using the sign out button - the login dialog closes, and after opening the login dialog again, the google sign-in button no longer appears.

There's no v-if condition on the button element, or any element that contains it.

Important to mention, right after signing out, before the dialog fully closes, the button still appears, and even changes from "signed in" to "sign in", but after the dialog closes, opening it again will not render the button.

Tested in FireFox and Chrome

The dialog code for reference:

<v-dialog
    v-model="loginDialogOpened"
    width="500">
    <v-card width="500">
      <v-card-title>{{ loginString }}</v-card-title>
      <v-card-text v-if="!isLoggedIn() && loginAsAdmin">
        <v-text-field
          v-model="devadminPassword"
          type="password"
          label="password"></v-text-field>
      </v-card-text>
      <v-card-text v-if="!isLoggedIn()">
        <v-btn large color="grey"
          @click="loginAsAdmin = true;"
          >Login As Admin
        </v-btn>
      </v-card-text>
      <v-card-text>
        <GoogleLogin
          :params="googleParams"
          :renderParams="googleRenderParams"
          :onSuccess="googleOnSuccess"
          :onFailure="googleOnFailure"
        >Login</GoogleLogin>
      </v-card-text>
      <v-card-text v-if="isLoggedIn() && withGoogle">
        <GoogleLogin
          :logoutButton="true"
          :params="googleParams"
          :onSuccess="googleLogoutOnSuccess"
          :onFailure="googleLogoutOnFailure"
        >Logout</GoogleLogin>
      </v-card-text>
      <v-card-actions>
        <v-btn large color="green"
          v-if="!isLoggedIn()"
          @click="login"
          >Submit
        </v-btn>
        <v-btn large color="grey"
          v-if="isLoggedIn()"
          @click="logout">
          Logout
        </v-btn>
      </v-card-actions>
    </v-card>
  </v-dialog>

The dialog - before signing in: image

After signing in: image

After signing out: image

tomklino avatar Sep 13 '20 18:09 tomklino