Digits is a free phone-number-based log in solution. This repository showcases how you can use Digits in a React application. Using ES6 with the help of Babel - because as my friend Bob says, "It's like living in the future".
git clone https://github.com/AnSavvides/react-digits.git
cd react-digits
npm install
grunt watch
Now open src/ReactDigits.js
and enter your consumer key inside the componentWillMount
function where we first initialize Digits.
You can find your consumer key in your Fabric web dashboard under the Twitter Kit tab. Note that Digits does not work with keys created from apps.twitter.com.
# install pre-requisites
pip install -r requirements.pip
# start the server (in a separate tab)
python server.py
# install pre-requisites
gem install bundler
bundle install
# start the server (in a separate tab)
ruby server.rb
Head over to localhost:5000
and you should be able to see this code in action; try and log in using Digits!
All contributions are welcome; fork the repository, make your changes and open a pull request. Try to stick to the coding conventions that are already in place.
At the moment, what would be most useful is adding code to show an end-to-end solution of how to use Digits. At present we only show how this is done using a Python back-end. Have a look at the issue tracker and feel free to say you are interested to work on something that has not already been assigned. Right now we have open tickets for building PHP, node.js, Lua and Go back-ends. If you want to add support for another language, feel free to open an issue!
- Digits is not available as an npm package, but rather over CDN; because of that, we had to include the Digits web SDK over CDN & reference it in our
webpack
configuration inexternals
. As a side effect, this is stopping us from creating this solution as a reusable npm-installable component.