2013-08-11 2 views
3

사용자 지정 OmniAuth 전략을 작성하려고합니다. 이것은 사용자 이름과 암호를 요구해야합니다. https://github.com/intridea/omniauth/wiki/Strategy-Contribution-Guide은 유용한 시작이며 현재이 문서에서 언급 한 OmniAuth :: Form 메서드를 사용하고 있지만 이제는 더 나은 로그인 양식을 구현하려고합니다.omniauth 사용자 지정 요청 양식

이 문서에는 OmniAuth has a very simple form builder built into it so that you can easily prompt the user for information that's needed for your strategy. These forms are really not meant to be shown to end users but rather work as a stopgap for developers until they implement custom forms...이 나와 있지만 사용자 정의 양식을 구현하는 방법은 나와 있지 않습니다.

어떻게해야합니까? 좋은 예가 있습니까? 당신은 랙 미들웨어를 지정할 때

답변

2

OmniAuth wiki에 따르면, 당신은 단지 사용하기 :form 옵션을 제공해야합니다

use OmniAuth::Builder do 
    provider :example, :form => SessionsController.action(:new) 
end 
관련 문제