Created
January 20, 2012 18:01
-
-
Save tyabe/1648703 to your computer and use it in GitHub Desktop.
OmniAuth-Identityのデフォルトフォームを使用しないようにする
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
Rails.application.config.middleware.use OmniAuth::Builder do | |
provider :identity, fields: [:name, :email], | |
on_failed_registration: lambda{|env| IdentitiesController.action(:new).call(env)} | |
end | |
# "/auth/identity/register"をroutesで上書き出来るようにする | |
module OmniAuth | |
module Strategies | |
class Identity | |
def registration_form | |
call_app! | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment