-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Auth emulator via useEmulator #778
Comments
This should have been obvious. Could Firebase teams please have a post-mortem about why such information leaks through, and releases are not in sync? Then again, none of the Changelogs likely state that we should expect firebaseui to be compatible with the auth emulation, do they? |
Hi @c5n8 thanks for raising this! We are aware of the issue and we are investigating (b/165671830). |
@akauppi -- We released the Auth Emulator BETA just last week. We're really excited about the emulator and we wanted to get it into the hands of customers as quickly as we could, knowing how valuable it can be to a safe development workflow!🙂 We're currently working on ensuring that the Auth emulator works with FirebaseUI; it has a slightly different release schedule, and releases aren't always aligned with other Firebase SDKs. |
FirebaseUI cannot currently readily support the Auth emulator as it creates an internal Auth instance which does not propagate the emulator settings. Additional work is needed to support this. Filed it as a feature request. |
@samhorlbeck just a slight nod. I meant no harm. Somehow the mention that Auth Emulator was only beta has escaped me. |
@akauppi no worries, that's how I spell "BETA," not meant as emphasis :) |
It's not explicit in the original comment, but am I correct in thinking that @c5n8 is referring to the fact that the useEmulator() method suggested in the linked docs (copied below) appears to be undefined?
At least when I try to use it in my React app I get a 'useEmulator is not a function' error from webpack and my IDE (WebStorm). I would note that the same method is suggested for the firestore emulator and is also wrong. The code given in the docs is:
What actually works is:
|
@jmcdl this is a different issue: Firebase UI for Auth does not currently honor the call to If you're still having the issue, please file a bug in the firebase-js-sdk repo. |
@samhorlbeck thank you, you were correct that I wasn't using the latest version of the firebase sdk. Updating the SDK has resolved the error. |
Great to read that I'm not the only one in need of this. Any idea when this might be resolved? Thank you so much for the work that you do. Greatly appreciated. |
Hey folks, in order to support the emulator in firebaseui, the emulator settings need to be copied from the external auth instance into the temporary internal one. This can be done after initialization of the internal instance. However, the missing piece is that we need to get the emulator settings from the provided Auth instance and I don't believe that a getter for this is exposed yet. |
Docs should be more clear. I immagined it would simply work as in the docs. There should be a warning about this here: https://firebase.google.com/docs/emulator-suite/connect_auth Hope the feature is here soon :) |
@cupcakearmy I might be missing something, but I believe what was meant above is that |
@benomatis yes. Without the UI the Auth emulation works. It's just not mentioned anywhere. So a little temporal warning would be very helpful :) But the UI is the most common way, especially at the beginning to use auth in firebase. |
@cupcakearmy If anywhere, it should probably be mentioned in firebaseui's docs, not the main firebase docs; it's basically a separate product. |
Sure. Just somewhere where it's obvious :) |
Whew thought I was losing my mind!! |
Needed this to work now, so I removed the creation of the internal Auth instance just to see what breaks. Nothing did – for all I can say – so I was wondering what this mechanism is/was actually meant for? Pull request: #794 |
Edit: removed my original comment since it's the same thing mentioned in #778 (comment) Following up on #778 (comment), is the next step to file an issue on firebase-js-sdk requesting |
Yes |
@bojeil-google do you know if there is an estimated ETA on this? |
@samhorlbeck is currently working on it. |
I believe it should now be possible to get the emulator settings with the latest Firebase SDK: https://firebase.google.com/support/release-notes/js#version_824_-_january_21_2021 |
Looks like it's been added here as well, but not yet released: bb65d49 |
Any approximate ETA on the release date? I'm unfamiliar with how frequently they occur. |
We are working on it. We discovered another unrelated issue in the process of the release and we may have to delay the release until the bug is fixed. You can expect this to be out sometime this week or next week. |
Emulator support should now be available in the latest FirebaseUI-web release. |
firebaseui emulator pending for firebase/firebaseui-web#778
I'm still having issues with this. It looks like some requests are sent to the emulator and some are not. Here is my code: firebase.initializeApp(FIREBASE_CONFIG, 'debug');
var auth = firebase.auth()
auth.useEmulator("http://localhost:9099")
var ui = new firebaseui.auth.AuthUI(auth);
ui.start('#firebaseui-auth-container', {
signInSuccessUrl: '/transactions',
signInOptions: [
{
provider: firebase.auth.EmailAuthProvider.PROVIDER_ID,
requireDisplayName: false
}
]
});
However, if I proceed to login with a live api key and a production account, and then check for |
Problem solved, in case it's useful for someone: updating firebaseui is not enough, you also need to be on firebase |
Is your feature request related to a problem? Please describe.
UI still connect to project server when using auth emulator.
Describe the solution you'd like
A way to connect UI to auth emulator.
Describe alternatives you've considered
I have modified default auth instance to use emulator, but still failed to make UI use emulator.
Additional context
Related Documentation
The text was updated successfully, but these errors were encountered: