question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Once I log out and redirect the user to Auth page I get: app duplicate error.

See original GitHub issue

var ui = new firebaseui.auth.AuthUI(firebase.auth()); ui.start('#firebaseui-auth-container', uiConfig);

I think we need to make sure to not initalize firebase.auth() again if it has already been created. Any suggestion?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
xerosanyamcommented, Jun 16, 2017

Thank you very much. I am able to solve this issue by keeping a reference to ui, which was obvious but I was not able to do it in vue. But I found a solution. Keeping code and other keywords for SEO

Error I was facing: Firebase: Firebase App named ‘[DEFAULT]’ already exists (app/duplicate-app).

Technology stack: Vue + Firebase + FirebaseUI

Blog I followed to implement authentication in Vuejs: https://medium.com/dailyjs/authenticating-a-vue-js-application-with-firebase-ui-8870a3a5cff8

Solution:

  1. Keep a data field ui in main.js
  2. when instantiating ui, follow this
if(this.$root.ui!=''){
    this.$root.ui.reset()
}else{
    this.$root.ui = new firebaseui.auth.AuthUI(firebase.auth());
}
this.$root.ui.start('#firebaseui-auth-container', uiConfig);
3reactions
bojeil-googlecommented, Jul 20, 2017

We added a delete method on the AuthUI instance and a helper firebaseui.auth.AuthUI.getInstance(appId) so you don’t have to save the AuthUI reference and pass it around. This is available now in https://github.com/firebase/firebaseui-web/releases/tag/v2.3.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

django logout redirects me to administration page
admin comes after 'your_application'. Both templates are located in the same relative path and the Django template loader will use the first one...
Read more >
Cannot use Twitter Oauth with Redirect due to "Ignoring ...
When I change the loginStyle to redirect, I get an error "Ignoring unexpected duplicate page load login attempt info" that is stopping the ......
Read more >
How to Fix WordPress Login Page Refreshing ... - WPBeginner
Incorrect WordPress URL settings and failure to set login cookies are the most common reasons causing the login page redirect and refresh issue....
Read more >
Redirect Users - Auth0
Describes how to redirect users to URLs that have not been added to the AllowList.
Read more >
Creating User-Specific Redirects After Login
Create user-specific redirects after user login. The specifications could be based on user type/role or based on a subscription date or even on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found