kkkon / demo-link-ext-account-by-node

Demo link external account by node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo link external account by node.js

This application help you, link your application's ID to external ID of google and amazon.

You already have identify mechanisum on Android application or iOS application.

But your application recover user's ID is hard work, this application is useful.

Summary of application

modules

express

passport

these strategy use for passport module

  • passport-google-openidconnect module for Google OpenID Connect
  • passport-amazon module for Amazon

Application's session save to mongodb by connect-mongo.

mongoose module for model.

mode

Application have two mode

  • link to external account
  • recovery from external account

Requirements

Pre setting

NOTE: Setting files are config/ directory.

Please refer to config module

external account setting

Do not forget to set the google and amazon client_ids, client_secrets and redirects.

mongodb setting

Do not forget to set the mongodb url, optional collection_sessions.

Install

$ git clone https://github.com/kkkon/demo-link-ext-account-by-node.git
$ npm install

and then

$ npm start

Finally, access to http://localhost:3000/.

kick this application from your application

NOTE: You must encrypt or encode, againt attack.

Or change to token for these parameters, mode and appuid.

link mode

http://localhost:3000/?mode=link&appuid=XXXX

recover mode

http://localhost:3000/?mode=recovery

regist User at development env

http://localhost:3000/dev/regist?appuid=XXXX

Credits

License

The MIT License

Copyright (c) 2015 Kiyofumi Kondoh

About

Demo link external account by node.js

License:MIT License


Languages

Language:JavaScript 99.7%Language:CSS 0.3%