Sha256: 540a16616c731ee70fe2dadf5df1b8605b6ec38d4fa518ab52452c354eae7e48
Contents?: true
Size: 652 Bytes
Versions: 11
Compression:
Stored size: 652 Bytes
Contents
# -*- coding: utf-8 -*- require 'tdiary/application' require 'tdiary/rack/auth/omniauth' TDiary::Application.configure do config.builder do use ::Rack::Session::Pool, :expire_after => 2592000 use OmniAuth::Builder do configure {|conf| conf.path_prefix = "/auth" } provider :twitter, ENV['TWITTER_KEY'], ENV['TWITTER_SECRET'] provider :github, ENV['GITHUB_KEY'], ENV['GITHUB_SECRET'] end map('/auth') do run TDiary::Rack::Auth::OmniAuth::CallbackHandler.new end end config.authenticate TDiary::Rack::Auth::OmniAuth, :twitter do |auth| # TODO: an user can setting auth.info.nickname == 'your_twitter_screen_name' end end
Version data entries
11 entries across 11 versions & 1 rubygems