Skip to content

Instantly share code, notes, and snippets.

@tyabe
Created January 20, 2012 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyabe/1648703 to your computer and use it in GitHub Desktop.
Save tyabe/1648703 to your computer and use it in GitHub Desktop.
OmniAuth-Identityのデフォルトフォームを使用しないようにする
# 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