MCPcopy Create free account
hub / github.com/codecombat/codecombat / onFacebookLoginError

Method onFacebookLoginError

app/views/core/AuthModal.js:283–297  ·  view source on GitHub ↗
(res)

Source from the content-addressed store, hash-verified

281 }
282
283 onFacebookLoginError (res) {
284 this?.$('#unknown-error-alert').addClass('hide')
285 if (res.errorID && (res.errorID === 'individuals-not-supported')) {
286 forms.setErrorToProperty(this.$el, 'emailOrUsername', $.i18n.t('login.individual_users_not_supported'))
287 this.$('#unknown-error-alert').removeClass('hide')
288 } else if (res.code === 404) {
289 forms.setErrorToProperty(this.$el, 'emailOrUsername', $.i18n.t('loading_error.user_not_found'))
290 this.$('#unknown-error-alert').removeClass('hide')
291 }
292
293 const btn = this.$('#facebook-login-btn')
294 btn.find('.sign-in-blurb').text($.i18n.t('login.sign_in_with_facebook'))
295 btn.attr('disabled', false)
296 return errors.showNotyNetworkError(...arguments)
297 }
298
299 // Clever
300

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected