in javascript/widgets/handler/passwordsignup.js [142:191]
function(error) {
// Ignore error if cancelled by the client.
if (error['name'] && error['name'] == 'cancel') {
return;
}
const normalizedError =
firebaseui.auth.widget.handler.common.normalizeError(error);
let errorMessage =
firebaseui.auth.widget.handler.common.getErrorMessage(
normalizedError);
switch (normalizedError['code']) {
case 'auth/email-already-in-use':
// Check if the user is locked out of their account or just display
// the email exists error.
return firebaseui.auth.widget.handler.onEmailExists_(
app, component, /** @type {string} */ (email), normalizedError);
break;
case 'auth/too-many-requests':
errorMessage = firebaseui.auth.soy2.strings
.errorTooManyRequestsCreateAccount().toString();
case 'auth/operation-not-allowed':
case 'auth/weak-password':
firebaseui.auth.ui.element.setValid(
component.getNewPasswordElement(),
false);
firebaseui.auth.ui.element.show(
component.getNewPasswordErrorElement(),
errorMessage);
break;
case 'auth/admin-restricted-operation':
if (app.getConfig().isAdminRestrictedOperationConfigured()) {
const container = component.getContainer();
component.dispose();
firebaseui.auth.widget.handler.handle(
firebaseui.auth.widget.HandlerName.UNAUTHORIZED_USER,
app,
container,
email,
firebase.auth.EmailAuthProvider.PROVIDER_ID);
} else {
component.showInfoBar(errorMessage);
}
break;
default:
firebaseui.auth.log.error(
'setAccountInfo: ' + goog.json.serialize(normalizedError));
component.showInfoBar(errorMessage);
break;
}
}));