Flutter Firebase身份验证仿真器启用 [英] Flutter Firebase Authentication emulator enabling

查看:100
本文介绍了Flutter Firebase身份验证仿真器启用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将 Firebase身份验证模拟器连接到我的Flutter移动项目执行一些本地测试.不幸的是,似乎无法使用 FlutterFire插件.

启用 Firestore 云函数仿真器,但是我找不到身份验证的方法.

有没有可以遵循的想法或最佳实践的人?

解决方案

看来,连接到身份验证仿真器的方法尚未建立到FlutterFire库中.

在Github存储库中记录了一个问题,因此您可以跟踪其状态那里.

更新:看起来现在已经着陆了 firebase_auth 软件包的0.20版(及更高版本)中.语法应类似于:

  FirebaseAuth.instance.useEmulator('http://localhost:9099'); 

I'm trying to hook the Firebase Authentication emulator to my Flutter mobile project to perform some local testing. Unfortunately it seems it is not possible to do with the FlutterFire plugin.

There is no problem whatsoever to enable Firestore or Cloud Functions emulators, but I can not find a way for Authentication.

Is there someone with ideas or best practices to follow?

解决方案

It looks like the method to connect to the Authentication emulator hasn't made it to the FlutterFire libraries yet.

An issue was logged for it in the Github repo, so you can follow its status there.

Update: It looks like this has now landed in version 0.20 (and later) of the firebase_auth package. The syntax should be something like:

FirebaseAuth.instance.useEmulator('http://localhost:9099');

这篇关于Flutter Firebase身份验证仿真器启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆