in javascript/widgets/handler/common.js [541:602]
var signInResultErrorCallback = function(error) {
// Clear pending redirect status if redirect on Cordova fails.
firebaseui.auth.storage.removeRedirectStatus(app.getAppId());
// Ignore error if cancelled by the client.
if (error['name'] && error['name'] == 'cancel') {
return;
}
// Normalize the error.
const normalizedError =
firebaseui.auth.widget.handler.common.normalizeError(error);
switch (normalizedError['code']) {
case 'auth/popup-blocked':
// Popup blocked, switch to redirect flow as fallback.
processRedirect();
break;
case 'auth/popup-closed-by-user':
case 'auth/cancelled-popup-request':
// When popup is closed or when the user clicks another button,
// do nothing.
break;
case 'auth/credential-already-in-use':
// Do nothing when anonymous user is getting updated.
// Developer should handle this in signInFailure callback.
break;
case 'auth/network-request-failed':
case 'auth/too-many-requests':
case 'auth/user-cancelled':
// For no action errors like network error, just display in info
// bar in current component. A second attempt could still work.
component.showInfoBar(
firebaseui.auth.widget.handler.common.getErrorMessage(
normalizedError));
break;
case 'auth/admin-restricted-operation':
component.dispose();
if (app.getConfig().isAdminRestrictedOperationConfigured()) {
firebaseui.auth.widget.handler.handle(
firebaseui.auth.widget.HandlerName.UNAUTHORIZED_USER,
app,
container,
null,
providerId);
} else {
firebaseui.auth.widget.handler.handle(
firebaseui.auth.widget.HandlerName.CALLBACK,
app,
container,
goog.Promise.reject(normalizedError));
}
break;
default:
// Either linking required errors or errors that are
// unrecoverable.
component.dispose();
firebaseui.auth.widget.handler.handle(
firebaseui.auth.widget.HandlerName.CALLBACK,
app,
container,
goog.Promise.reject(normalizedError));
break;
}
};