FIX: replace reference to Google_oauth2 with Google during signup

This commit is contained in:
Neil Lalonde 2016-03-29 18:08:55 -04:00
parent 25235eca1c
commit 3e5f2bd1cf
2 changed files with 10 additions and 2 deletions

View File

@ -111,7 +111,7 @@ export default Ember.Controller.extend(ModalFunctionality, {
return Discourse.InputValidation.create({
ok: true,
reason: I18n.t('user.email.authenticated', {
provider: this.get('authOptions.auth_provider')
provider: this.authProviderDisplayName(this.get('authOptions.auth_provider'))
})
});
}
@ -133,6 +133,13 @@ export default Ember.Controller.extend(ModalFunctionality, {
return this.get('authOptions.email') === this.get("accountEmail") && this.get('authOptions.email_valid');
}.property('accountEmail', 'authOptions.email', 'authOptions.email_valid'),
authProviderDisplayName(provider) {
switch(provider) {
case "Google_oauth2": return "Google";
default: return provider;
}
},
prefillUsername: function() {
if (this.get('prefilledUsername')) {
// If username field has been filled automatically, and email field just changed,

View File

@ -3,11 +3,12 @@ require "openid_redis_store"
# if you need to test this and are having ssl issues see:
# http://stackoverflow.com/questions/6756460/openssl-error-using-omniauth-specified-ssl-path-but-didnt-work
# OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE if Rails.env.development?
Rails.application.config.middleware.use OmniAuth::Builder do
Discourse.authenticators.each do |authenticator|
authenticator.register_middleware(self)
end
end
OmniAuth.config.logger = Rails.logger