Giter Site home page Giter Site logo

app-server's Introduction

Idea

  • The app server is independent from authentication server (https://github.com/kelci2017/Authentication-server)
  • The app server is mainly for mobile apps
  • The app server return the token to mobile apps when user login in the mobile app
  • The app fetch the token from authentication server
  • Everytime the mobile app call the app server with JWT token in the header
  • The app server request the authentication server to verfy the token
  • The app server and the authentication server has the same auth_config key
  • All routes need validate the session, the session timeout is 2 days
  • The session timestamp is updated everytime when mobile app call the app server
  • When mobile app fetch info from app server with sessionid in the query, userid can be found in the database, then the needed info could be returned to the mobile app
  • All tables in the database can be referred by userid
  • If session was timeout, the app server remove the session from database and return timeout to the mobile app

Amazon sns notification to FCM & APNS

  • Amazon sns notification is in branch sns_notification
  • When app server get token from apps(ios & android), it send token to amazon sns, and sns will send notifications to FCM or APNS
  • Apps call app server with API regiterNotification, post the deviceid and token to server. Once token is refreshed at the app side, based on the deviceid, token will be refreshed also at the server side.
  • When apps create notifications, server will send notifications to all the devices which logged in with the same user, except for the device who create notes. It means the device who create notes will not receive notifications to himself.

Instructions

If you would like to download the code and try it for yourself:

app-server's People

Contributors

kelci2017 avatar

Watchers

James Cloos 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.