This is a PoC of an MSISDN Gateway server that takes a phone number an register it using an SMS validation.
It implements the proposal here : ./API.md
The API are discussed on the loop-dev mailing list at https://mail.mozilla.org/listinfo/loop-dev
- The client make a
/register
request.
-- The server choose the verification process based on MSISDN, MCC and MNC codes and return a sessionToken and a verify endpoint.
- The client make a
/sms/verify
(verify endpoint) request
-- The server send a SMS with a code and return the number used to send it (for silent SMS catch)
- The client ask for
/verify_code
with the sessionToken and the code and get a BrowserID certificate. - If needed the client can also ask for a new code with
/sms/resend_code
and its sessionToken. - Finally the client can destroy its registration using
/unregister
and its sessionToken.
You will need redis-server installed:
apt-get install redis-server
Assuming you have brew installed, use it to install redis:
brew install redis
If you need to restart it (after configuration update):
brew services restart redis
Then clone the loop server and install its dependencies:
git clone https://github.com/mozilla-services/msisdn-gateway.git
cd msisdn-gateway && make install
You can create your configuration file in config/{NODE_ENV}.json
development
is the environment by default.
make runserver
this is equivalent to:
NODE_ENV=development make runserver
make test
You should report bugs/issues or feature requests via Github Issues
The MSISDN Gateway code is released under the terms of the
Mozilla Public License v2.0. See the
LICENSE
file at the root of the repository.