Ionic2 authentication firebase

前端 未结 4 1849
温柔的废话
温柔的废话 2020-11-30 08:21

I am creating a system of authentication by number of cell phone in ionic 2, for that I use the google guide

First, I believe a firebase.auth.RecaptchaVerifie

4条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 08:57

    If you don't want to use dynamic/deep links as suggested by bojeil, you can try this:

    Using Cordova, I moved all the authentication process to a webpage hosted on my server. From my app, I used an In-app Browser to launch the webpage, and then carry out all the app-browser communication by long-polling the server which acts as the middleman. I even managed to parse the SMS and close the browser in the end automatically.

    For this to work, be careful with the security, which can be quite tricky.

    Alternatively, you may use Firebase Realtime Database instead of server polling to pass around the messages.

    You may need these cordova plugins:

    • InAppBrowser
    • BackgroundMode
    • Permission
    • Cordova SMS Receiver Plugin

提交回复
热议问题