Skip to content
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

feat(authentication): provide the auto-retrieved SMS verification code #272

Merged
merged 6 commits into from
Dec 4, 2022

Conversation

robingenz
Copy link
Member

Pull request checklist

Please check if your PR fulfills the following requirements:

  • The changes have been tested successfully.
  • A changeset has been created (npm run changeset).

Close #252

@robingenz robingenz added platform: android Android platform feature Feature labels Dec 3, 2022
@robingenz robingenz self-assigned this Dec 3, 2022
@robingenz robingenz added this to the v1.3.0 milestone Dec 3, 2022
@robingenz
Copy link
Member Author

npm i @capacitor-firebase/[email protected]

@robingenz robingenz marked this pull request as ready for review December 3, 2022 18:51
Copy link
Contributor

@alexookah alexookah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good :)

@robingenz robingenz merged commit 4c00b61 into main Dec 4, 2022
@robingenz robingenz deleted the feat/issue-252 branch December 4, 2022 18:45
@github-actions github-actions bot mentioned this pull request Dec 4, 2022
@robingenz
Copy link
Member Author

robingenz commented Dec 4, 2022

phoneVerificationCompleted is only available on Android and fires not always but only when an SMS is auto-retrieved or the phone number has been instantly verified (see docs).

@alexookah
Copy link
Contributor

alexookah commented Dec 4, 2022

How can I test the branch main? (now that you merged it). Would like to test it again.

@robingenz
Copy link
Member Author

@alexookah I created a new dev build for you:

npm i @capacitor-firebase/[email protected]

@alexookah
Copy link
Contributor

alexookah commented Dec 4, 2022

Can I also test this with the messaging? because I am also using the messaging and it's not very easy

@robingenz
Copy link
Member Author

@alexookah Yes, with this release ^^

npm i @capacitor-firebase/[email protected]

@alexookah
Copy link
Contributor

Thanks for the dev build.
I did not succeed getting the trigger with the phoneVerificationCompleted. Just tried it in a real device and didn't work. Maybe we are missing something?

@alexookah
Copy link
Contributor

alexookah commented Dec 4, 2022

I tested it from a apk that I downloaded from google play console as beta.
Would it make a difference if it was a production app?

@robingenz
Copy link
Member Author

I have ordered a sim card for my android test device. I will get back to you as soon as I have had a chance to test it.

Paso pushed a commit to ice-cream-club/capacitor-firebase that referenced this pull request Apr 19, 2023
@carlossk
Copy link

Hi @robingenz, I have recently started to have a problem related to auto-retrieved SMS in android, does the plugin have any way to disable that mechanism?
Currently our users have experienced this error, it seems that the code is retrieved and burned by android automatically
{"code":"auth/code-expired","customData":{},"name":"FirebaseError"}

@robingenz
Copy link
Member Author

Hi @robingenz, I have recently started to have a problem related to auto-retrieved SMS in android, does the plugin have any way to disable that mechanism?

Currently our users have experienced this error, it seems that the code is retrieved and burned by android automatically

{"code":"auth/code-expired","customData":{},"name":"FirebaseError"}

No, you cannot disable this mechanism. See firebase/quickstart-android#296

@efstathiosntonas
Copy link

efstathiosntonas commented Nov 28, 2023

@robingenz you can patch it to stop autoverify: firebase/quickstart-android#296 (comment)

Using this patch for a year and had 0 issues so far.

@robingenz
Copy link
Member Author

robingenz commented Nov 28, 2023

@efstathiosntonas Thanks for sharing! Would you be willing to create a PR which allows you to set the timeout?

Edit: I created an issue for this: #501

@efstathiosntonas
Copy link

efstathiosntonas commented Nov 28, 2023

@robingenz I'd be happy to do so but unfortunatelly I do not use capacitor and I'm not familiar with the source code. 🤷‍♂️

(I landed here from the reference to this issue from firebase's repo issue)

@robingenz
Copy link
Member Author

@efstathiosntonas All right! Thanks for the tip anyway. I will implement it.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Feature platform: android Android platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(authentication): provide the auto-retrieved SMS verification code
4 participants