简体   繁体   English

Omniauth提供程序区域设置

[英]Omniauth provider locale

I use Devise with Omniauth to let users log in through their Facebook and Google accounts. 我将Devise与Omniauth结合使用,以允许用户通过其Facebook和Google帐户登录。 However I have one problem... 但是我有一个问题...

If I want to change the name of the provider, ie. 如果我想更改提供者的名称,即。 Google Oauth2 to Google . Google Oauth2Google How can I achieve this on buttons and other sign in forms? 如何在按钮和其他登录表单上实现此目的?

<%= link_to image_tag('facebook-login.png',:size=>'30x30'), user_omniauth_authorize_path(:facebook) %>

<%= link_to image_tag('google-plus-logo.png',:size=>'30x30'), user_omniauth_authorize_path(:google_oauth2) %>

<%= link_to image_tag('twitter-login.png',:size=>'30x30'), user_omniauth_authorize_path(:twitter) %>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM