useAuthEmulator method
Changes this instance to point to an Auth emulator running locally.
Set the host
and port
of the local emulator, such as "localhost"
with port 9099
Note: Must be called immediately, prior to accessing auth methods. Do not use with production credentials as emulator traffic is not encrypted.
You must start the emulator in order to use it, the method will throw a SocketException if there's no running emulator, see: https://firebase.google.com/docs/emulator-suite/install_and_configure#install_the_local_emulator_suite
Implementation
Future<Map> useAuthEmulator(
{String host = 'localhost', int port = 9099}) async {
try {
return await _api.emulator.useEmulator(host, port);
} catch (e) {
rethrow;
}
}