Giter Site home page Giter Site logo

play-angular-social-auth's Introduction

Example application for Play + AngularJS + Authorization with Social login.

Intro

I've just begun to learn Scala, Play and AngularJs. This is just a very basic sample application so I could play around and deal with a single-page's app security and experiment with these technologies. Oauth provider(facebook and google) are used to authorize the client. Angular frontend then uses the generated token for signing the request. I think in reality I will end up using a comprehensive library for security such as play-silhouette which seems to be actively developed, playing around for now!

The template used here was the template generously provided by Marius Soutier play-angular-require-seed. It also the blog post Securing AngularJS Applications with Play

For authorizing with google I used the realease candidate of google's java api client => sbt: "com.google.api-client" % "google-api-client" % "1.17.0-rc". And For authorizing with facebook I used google restfb since the facebook's official java api client is not actively maintained anymore => sbt: "com.restfb" % "restfb" % "1.6.12".

Its quite easy to use other providers by extending the authorizer trait and building the AuthorizationContainer with that trait.

provider match { case "google" => authorizer = Option(new AuthorizationContainer with GoogleAuthorizationService) }

The app is running on http://play-angular-social-auth.herokuapp.com. This works fine on Chrome and Firefox but for some reason login doest not work in Safari! I get [Error] Failed to load resource: the server responded with a status of 400 (Bad Request) I would greatly appreciate it if someone could help me understand why.

Running the app locally

  • play update
  • Edit to social.conf and add your own client id, client secret and redirect url.
  • Run via play ~run
  • Go to localhost:9000

play-angular-social-auth's People

Contributors

esfand-r avatar

Stargazers

Alex avatar Angelo Huang avatar

Watchers

 avatar

Forkers

rocknrollmarc

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.