Connect Signup is a sample Signup Application for Fewlines Connect. Here is a simplified view of the app:
┌─────────────────┐
transaction_id, ----> │ │ ---> redirect to fewlines-connect
redirect_uri, │ Custom Signup │ with transaction_id and
locale │ │ security_code
└─────────────────┘ ┆
⌃ ┆
┆ ┆
└ callback from fewlines-connect <---┘
with transaction_id and user_id
Fewlines Connect only stores the information required to authenticate a User
(e.g. email, phone). This application will enable an application to ask (and
store) more information about the user, and link it to the the Fewlines
Connect user_id
.
To do so, this application extends the Sign Up process of Fewlines Connect:
- the user start the process on Fewlines Connect
- if a custom signup has been registered, the user is redirected to it
- the user enter their information and Connect Signup stores it with a
temporaray
transaction_id
- the user is redirected back to Fewlines Connect
- once the user is fully registered to Fewlines Connect, Connect Signup is
called back with the
user_id
from Fewlines Connect - Connect Signup can then store
user_id
along with the custom data, to make sure they are linked
Connect Signup is compatible with Node 8.9.0
and beyond.
You will need to set some environment variable to use the database. If you want
to use Docker for the database, you can just use docker-compose up
.
yarn install
cp .env.sample .env
yarn build
Edit .env
to match your own information:
- You should add the
CONNECT_SIGNUP_SECRET_KEY
that you got from Connect - Replace the
DATABASE_URL
if you don't want to use docker or a local database
Once your database is ready:
yarn db-migrate
Finally, to launch the server:
yarn start
yarn test
Please read the CONTRIBUTING document