Git Product home page Git Product logo

capacitor-phone-test's Introduction

capacitor-phone-test

For a long time I was having trouble using the firebase authentication system for phone numbers in ionic + capacitor. I got so frustrated I put it on the backburner and made a long post about it on stackoverflow (https://stackoverflow.com/questions/66573679/ionic-capacitor-firebase-phone-number-authentication-problems) I have finally got it working using the https://github.com/baumblatt/capacitor-firebase-auth library and https://github.com/angular/angularfire library. So thank you to those coders <3

How to use

Before you start, it is recommended that you are experienced with ionic, capacitor, and firebase.

  1. Create a firebase project and enable phone number authentication. Also make a web api key and ios api key. (Follow this tutorial if you get confused https://github.com/angular/angularfire/blob/master/docs/install-and-setup.md, from step 3 to 7) (Also follow this tutorial if you get confused on the ios part: https://firebase.google.com/docs/ios/setup)

Make sure you replace the GoogleServices-Info.plist in the ios project and add your firebaseConfig specs in the environment folder

ios googleservices connection

web environment connection

  1. Follow this tutorial to sync your APN in firebase https://stackoverflow.com/questions/45091583/invalid-token-when-trying-to-authenticate-phone-number-using-firebase

It should look like this at the end:

APN

  1. On line 17 in home.page.ts make sure you set phoneNum to the phone number of your phone

  2. Run npm install, then run ios cap sync

  3. Navigate to your the Xcode .workspace project in ios/App/App.workspace and setup your signing certificate.

provisional profile setup

  1. Connect an iphone to your computer and run the Xcode project on an Iphone
  • If your run into a problem, make sure to let me know in the issues section!
  • Also, if this project is helpful for you, I'd really appreciate it if you'd give it a start on github!

capacitor-phone-test's People

Contributors

darrow8 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.