Code to demonstrate usage of Omniauth and Sinatra
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
app
db/migrate
initializers
models
.gitignore
.rvmrc
Gemfile
Gemfile.lock
README.md
Rakefile
app.rb
config.ru

README.md

Introduction

Sample code to use Omniauth in conjunction with Sinatra.

Derived from

Watch Railcast to get an idea of how Omniauth can be used in Ruby.

Take a look at the code to understand rest of it.

Few things added

  • Use of Twitter Bootstrap(CDN reference)
  • Customized log in and registration page
  • Use of Identity Strategy
  • Simple role based sinatra routes.

Rake Tasks

rake db:create_migration  # create an ActiveRecord migration
rake db:migrate           # migrate the database (use version with VERSION=n)
rake db:rollback          # roll back the migration (use steps with STEP=n)

Access irb console

To be able to do some dirty checks

irb
load 'app.rb'
u = User.all