Sha256: 9a7b331b76f06bb477239f30f2babe2db2c6d94ba9b8820d472cb964ce55bb9b
Contents?: true
Size: 664 Bytes
Versions: 7
Compression:
Stored size: 664 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 == ENV['TWITTER_NAME'] || ENV['GITHUB_NAME'] end end
Version data entries
7 entries across 7 versions & 1 rubygems