GithubHelp home page GithubHelp logo

umbrella's Introduction

Umbrella

Background & Overview

Umbrella is a mobile application that facilitates communication between parents and teachers.

In the modern day and age, parents face the increasingly difficult challenge of balancing work with personal life. Our vision is to create a service which helps busy parents keep track of their children's everyday activities as well as offer teachers a platform to express their creativity. In doing so, we hope to employ cutting-edge technologies in mobile development in order to make education an exciting and memorable adventure.

gif

Umbrella consists of 4 key components that work together to securely connect parents and teachers.

  • Moments
  • User profile
  • Parent and Teacher functionality
  • Google Authentication

Moments

The key feature of Umbrella is the Moments component. Moments allow parents to keep up to date with their children's activities.

Live Updates

Parents have instant access to live status updates from their children's classes from the comfort of their home or office.

Teacher Functionality

Using moments, teachers can post live updates about their class, which parents can see immediately. Teachers can assign moments to particular children in their class and selectively notify only the parents of those children.

Dynamic Loading

Umbrella offers fast and responsive rendering by loading only the moments that it needs. Users can pull down the top of the page to reload the latest moments. To load older moments, users simply scroll to the bottom of the page and Umbrella will fetch more data as needed.

User Profile

The profile page gives parents an overview of their children's classes and teachers. Selecting a child switches to that particular child's moments.

Google Authentication

The privacy and security of our users is of utmost importance to us. That's why we protect our users with a two-part authentication process using Google OAuth2 and JSON Web Tokens.

Users can sign in to Umbrella using their Google+ account by tapping the "Sign in with Google" button.

It's easy, simple, and secure. Umbrella will never have access to the user's Google account. Instead, Google will verify the user's credentials and tell Umbrella to log you in.

Google OAuth2

OAuth is handled at the Rail backend using the Omniauth gem. Upon successful authentication, Google passes the server an oauth_token, which is saved to the user, and also passed back to Umbrella in the redirect URL.

JSON Web Token Authentication

Because the oauth_token in the URL carries the risk of being intercepted, it is not used to validate the user's session. Instead, Umbrella immediately submits it to the server to request a JSON Web Token, or JWT, delivered securely via HTTPS. The JWT is generated by encoding the user's oauth_token into the payload in order to create a JWT unique to that session.

def fetch_jwt
  oauth_token = request.headers['oauth_token']
  user = User.find_by(oauth_token: oauth_token)

  if user
    render json: ["You may only sign in from one device at a time."] if user.logged_in
    auth_token = JsonWebToken.encode({oauth_token: oauth_token})
    render json: {auth_token: auth_token}, status: :ok
  else
    render json: ["Session expired. Log in again."]
  end
end

Now when the user makes any request, they must send a JWT to be decoded and validated. Because only the server knows the secret_key it uses for encoding, only it can decode and encode its JWTs, ensuring that the payload cannot be read or tampered with. Furthermore, the JWT can only be fetched once per session. This ensures that even if a oauth_token is captured, only the intended user can log in to that session. Upon logout, the user's oauth_token is destroyed, and will be replaced by a new token given by Google on the next sign in. This invalidates the JWT for that session for further security. To learn more about the JSON Web Token, visit https://jwt.io/introduction/

umbrella's People

Contributors

lilyzqy avatar rainmire avatar gardenfiend138 avatar aastudent avatar

Watchers

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