Skip to content

🐛 [FIREBASE_AUTH] Cannot sign in twice with phone number with the emulator #8351

Closed
@cedvdb

Description

@cedvdb

When using phone authentication with the firebase emulator and android emulator the authentication works the first time, the firebase emulator generates an sms code. The second time, if the login is fast enough, no such code is generated and the first code is invalidated.


When recording the below gif I noticed the code was actually generated the second time, it is because I did it slowly, keep watching as I tries to do it fast it will fail. Sorry if the gif is a bit slow, I was surprised to see it working at first.

Recording 2022-03-28 at 16 50 23


I made a repro:

https://github.com/cedvdb/flutter_repros/tree/failing_auth

However it might require some setup:

  • it will require that you remove the firebase configs and initialize with your own project so you can run the emulator . So firebase init
  • You'll have to change the values in firebase_options.dart android with the values for firebase config android.
  • Have phone authentication enabled in your fierbase project
  • run emulator with firebase emulators:start

This is blocking for integration testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: androidIssues / PRs which are specifically for Android.plugin: authresolution: invalidThis doesn't seem right and might not belong here.type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions