When using firebase auth emulator, the console where firebase emulators:start is running, will output a link to emulate sign in.
My app is being built in Flutter. The following code creates the sign in link that is output in the emulator console.
final ActionCodeSettings acs = ActionCodeSettings(
url: 'https://example.com',
dynamicLinkDomain: 'mydomain.page.link',
handleCodeInApp: true,
iOSBundleId: kIosBundledId,
androidPackageName: kAndroidPackageName,
androidInstallApp: true,
androidMinimumVersion: '24',
);
await _firebaseAuth
.sendSignInLinkToEmail(
email: email,
actionCodeSettings: acs,
)
.catchError((onError) {
throw AuthException('Error sending email verification $onError');
}).then((value) {
debugPrint('Successfully sent email verification.');
});
Code above outputs links like the following where the action?mode=signIn:
http://localhost:9099/emulator/action?mode=signIn&lang=en&oobCode=lkjlkjklj&apiKey=fake-api-key&continueUrl=https%3A%2F%2Fmydomain.page.link%2FezHe
Pasting the link into my browser where the auth emulator is running at http://localhost:9099 I'm expecting to see something like this.
{
"authEmulator": {
"success": "The email has been successfully verified and you are signed in.",
"email": "customer@example.com"
}
}
Rather than the expected "success..." output, the continueUrl link, which is the short url configured in my Dynamic Links, is called and this short url then redirects to the configured deep link url for the dynamic link, which lands me on my desktop website. No auth emulator results are displayed.
If I remove the continueUrl parameter I can see the auth emulator output like below, so I know the auth emulator is evaluating the sign in as link. I can't find any docs on how to trigger the auth emulator for passwordless sign in auth testing.
{
"authEmulator": {
"error": "Missing continueUrl query parameter",
"instructions": "To sign in, append &continueUrl=YOUR_APP_URL to the link."
}
}
Am I missing an auth emulator parameter that should be part of the url to trigger passwordless sign in as auth?