Skip to content

Commit

Permalink
fix(auth): add get authUI instance (#1075)
Browse files Browse the repository at this point in the history
Prevent creation of duplicate app
  • Loading branch information
shadow81627 committed May 10, 2020
1 parent 6d9bc2e commit ea6bb36
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/firebaseui/auth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ export default {
if (process.client) {
const firebaseui = require('firebaseui');
// Initialize the FirebaseUI Widget using Firebase.
const ui = new firebaseui.auth.AuthUI(this.$fireAuth);
const ui =
firebaseui.auth.AuthUI.getInstance() ||
new firebaseui.auth.AuthUI(this.$fireAuth);
ui.start('#firebaseui-auth-container', {
signInSuccessUrl: '/profile',
signInOptions: [
Expand Down

1 comment on commit ea6bb36

@vercel
Copy link

@vercel vercel bot commented on ea6bb36 May 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.