Skip to content

toschas/omniauth-login-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

omniauth-login-demo

A rails app demonstrating omniauth usage, which can easily be deployed to Heroku.

Setup

Go to https://console.developers.google.com, create a new app, and enable the following APIs:

  • Contacts API

  • Google+ API

Go to Credentials and create a new Client ID, taking note of the CLIENT_ID and CLIENT_SECRET values. Make sure to set Redirect URIs and Javascript Origins correctly.

For example:

Change the server domain name with your Heroku server domain name.

Running Locally

Make sure you have Ruby installed. Also, install the Heroku Toolbelt.

$ git clone [email protected]:toschaslabs/omniauth-login-demo.git
$ cd omniauth-login-demo
$ bundle install
$ rake db:create db:migrate

Create application.yml from application.yml.example, change CLIENT_ID and CLIENT_SECRET with the ones from https://console.developers.google.com

$ foreman start web

Your app should now be running on localhost:5000. Because of the limitations for Redirect URIs and Javascript Origins Google Login isn't used when running the app locally, instead a 'Development User' is used.

Running tests

$ rake tests

Deploying to Heroku

$ heroku create
$ git push heroku master
$ figaro heroku:set -e production
$ heroku run rake db:migrate
$ heroku open

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published