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.

Mirage does not play well with firebase

See original GitHub issue

I’m using the npm firebase package alongside mirage in a React app. When I make a Firebase auth request, Mirage intercepts the HTTP request and firebase returns an auth/network-request-failed error. I have this.passthrough() at the bottom of my routes config in createServer but it still doesn’t work. Any ideas?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
JeffBeltrancommented, Oct 1, 2020

I was just looking how to fix this same issue @alistairholt .

Taking a look at the docs at the bottom of the overview section for pass through

    // If your API requests go to an external domain, pass those through by
    // specifying the fully qualified domain name
    this.passthrough("http://api.acme.com/**");

Just like you, having this.passthrough() did not solve the issue, but once i added the FQDN it worked without a hitch this.passthrough('https://www.googleapis.com/identitytoolkit/**');

Now i can ignore mocking the auth flow… for now

@samselikoff is there a “recipe” section for some common things like this? Like a simple gist or write up for mocking out 3rd party tools like firebase? if not, once i get around to doing it for this new project im working on maybe i’ll open a PR for the docs?

1reaction
timrbulacommented, Sep 13, 2021

For anyone looking at this in 2021, I was able to get it to work locally with this.passthrough("https://identitytoolkit.googleapis.com/**");

Looks like the auth domain has changed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firebase Realtime Database
Store and sync data with our NoSQL cloud database. Data is synced across all clients in realtime, and remains available when your app...
Read more >
Appsflyer vs Firebase: Which is Better for Attribution?
Short comparison on how Appsflyer vs Firebase compares for one fundamental question: mobile attribution for app installs.
Read more >
Algolia vs Mirage | What are the differences? - StackShare
Hi Rana, good question! From my Firebase experience, 3 million records is not too big at all, as long as the cost is...
Read more >
Firebase for user authentication in Vue.js - This Dot Labs
In this article, I will introduce Firebase User Authentication module to authenticate and authorize users accessing the Notes Writer app.
Read more >
ember.js - each helper doesn't display firebase data - Stack Overflow
If you're on Ember 2.x, it's {{#each model as |post|}} . See the relevant deprecation. You should be getting an error about that...
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