开发者

openid.ui.mode using rails' openid_authentication plugin

开发者 https://www.devze.com 2023-01-24 13:03 出处:网络
I\'m using the openid_authentication plugin to开发者_StackOverflow中文版 login my users with openid.

I'm using the openid_authentication plugin to开发者_StackOverflow中文版 login my users with openid.

On some pages (the one designed for mobile apps), I'd like to provide the openid.ui.mode = "popup" option so that the provider would display a lighter version of the login page.

Though, it appears the rack-openid gem (on which openid_authentication relies) filters the parameters provided, not allowing anything else than fields.

So doing the following :

authenticate_with_open_id(nil, {'openid.ui.mode' => 'popup'}) do |result|

Does not work.


This might work:

authenticate_with_open_id( nil, {'optional' => {'openid.ui.mode' => 'popup'}})...

If that doesn't work, you can try another OpenID plugin with more features:

  • https://github.com/nbudin/devise_openid_authenticatable
  • https://github.com/intridea/omniauth
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号