Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A sinatra extension that provides authentication for GMail authentication

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 example
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
README.md

sinatra_auth_gmail

A sinatra app that lets you authenticate users via gmail.

Developing

% gem install bundler
% bundle install
% bundle exec rake

Gemfile

gem "sinatra_auth_gmail"
# vim:ft=ruby

Example config.ru

require 'rubygems'
require 'bundler'

Bundler.setup
Bundler.require

class MyFirstGmailApp < Sinatra::Base
  use Rack::Session::Cookie
  register Sinatra::Auth::Gmail

  get '/' do
    authorize!
    haml "%h2= 'Hello There, #{gmail_user.full_name}!'"
  end
end

run MyFirstGmailApp

Executing

% bundle install
% bundle exec rackup

Visiting

% open http://localhost:9292
Something went wrong with that request. Please try again.