Skip to content

Commit 51c8f7a

Browse files
authored
chore: Shut down accountchooser credential helper (firebase#873)
1 parent e286bd0 commit 51c8f7a

10 files changed

+20
-64
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Remove `accountchooser.com` credential helper as well as all its related configs and enums.

README.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -1933,11 +1933,18 @@ on a server deployed locally, accessing the application through a `localhost`
19331933
address. However, it doesn't impact applications deployed on a server (as you
19341934
can verify in the [demo app](https://fir-ui-demo-84a6c.firebaseapp.com/)).
19351935

1936-
## Deprecated APIs
1936+
## Release Notes
1937+
1938+
**Latest**: https://github.com/firebase/firebaseui-web/releases/latest
1939+
1940+
**For v1.0.0 and superior:** https://github.com/firebase/firebaseui-web/releases
1941+
1942+
### 5.0.0
19371943

1938-
As a result of `accountchooser.com` switching to "universal opt-out" mode on
1939-
July 31st, 2020, FirebaseUI will no longer support `accountchooser.com`
1940-
credential helper.
1944+
`accountchooser.com` has been operating in "universal opt-out" mode and was
1945+
shutdown on July 2021. FirebaseUI-web has stopped supporting this credential
1946+
helper and since version v5.0.0, all related configurations and enums have been
1947+
removed.
19411948

19421949
- If you are using `firebaseui.auth.CredentialHelper.ACCOUNT_CHOOSER_COM`,
19431950
you need to switch to `firebaseui.auth.CredentialHelper.NONE` or
@@ -1949,12 +1956,6 @@ credential helper.
19491956
be provided by the latest
19501957
[one-tap API](https://developers.google.com/identity/one-tap/web/reference/js-reference).
19511958

1952-
## Release Notes
1953-
1954-
**Latest**: https://github.com/firebase/firebaseui-web/releases/latest
1955-
1956-
**For v1.0.0 and superior:** https://github.com/firebase/firebaseui-web/releases
1957-
19581959
### 0.5.0
19591960

19601961
See the milestone [0.5.0](https://github.com/firebase/firebaseui-web/milestone/1)

externs/firebaseui-externs.js

+1-13
Original file line numberDiff line numberDiff line change
@@ -467,12 +467,10 @@ firebaseui.auth.AuthUIError.prototype.toJSON = function() {};
467467

468468

469469
/**
470-
* The FirebaseUI credential helpers available. `ACCOUNT_CHOOSER_COM` is
471-
* deprecated and will be removed by Jan 31st, 2021.
470+
* The FirebaseUI credential helpers available.
472471
* @enum {string}
473472
*/
474473
firebaseui.auth.CredentialHelper = {
475-
ACCOUNT_CHOOSER_COM: 'accountchooser.com',
476474
GOOGLE_YOLO: 'googleyolo',
477475
NONE: 'none'
478476
};
@@ -485,16 +483,6 @@ firebaseui.auth.CredentialHelper = {
485483
*/
486484
firebaseui.auth.Config = function() {};
487485

488-
/**
489-
* The accountchooser.com configuration when it is selected as credential
490-
* helper. This is now a no-op and is deprecated and will be removed by
491-
* Jan 31st, 2021.
492-
*
493-
* @deprecated
494-
* @type {!Object|undefined}
495-
*/
496-
firebaseui.auth.Config.prototype.acUiConfig;
497-
498486
/**
499487
* Whether to upgrade anonymous users on sign-in. The default is false.
500488
*

javascript/utils/account.js

+3-9
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,8 @@ firebaseui.auth.Account = class {
8383
* @return {?firebaseui.auth.Account} The account.
8484
*/
8585
static fromPlainObject(account) {
86-
// TODO: Remove this filter once accountchooser.com supports non-email
87-
// accounts. We will also have to figure out how to choose a sign-in method,
88-
// since fetchProvidersForEmail won't work.
89-
if (account['email']) {
90-
return new firebaseui.auth.Account(
91-
account['email'], account['displayName'], account['photoUrl'],
92-
account['providerId']);
93-
}
94-
return null;
86+
return new firebaseui.auth.Account(
87+
account['email'], account['displayName'], account['photoUrl'],
88+
account['providerId']);
9589
}
9690
};

javascript/widgets/authui.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -580,9 +580,7 @@ firebaseui.auth.AuthUI.prototype.initElement_ = function(element) {
580580
// Make sure the locale uses hyphens instead of underscores.
581581
container.setAttribute('lang', firebaseui.auth.util.getUnicodeLocale());
582582

583-
// Only one auth instance can be rendered per page. This is because
584-
// accountchooser.com callbacks are set once to the AuthUI instance that
585-
// first calls them.
583+
// Only one auth instance can be rendered per page.
586584
if (firebaseui.auth.AuthUI.widgetAuthUi_) {
587585
// Already rendered, automatically reset.
588586
// First check if there is a pending operation on that widget, if so,
@@ -612,7 +610,7 @@ firebaseui.auth.AuthUI.prototype.initElement_ = function(element) {
612610
this.currentComponent_.getPageId() == 'blank' &&
613611
this.getConfig().federatedProviderShouldImmediatelyRedirect();
614612
// Removes pending status of previous redirect operations including redirect
615-
// back from accountchooser.com and federated sign in.
613+
// back from federated sign in.
616614
// Remove status after dispatchOperation completes as that operation depends
617615
// on this information.
618616
if (firebaseui.auth.storage.hasRedirectStatus(this.getAppId()) &&
@@ -809,7 +807,7 @@ firebaseui.auth.AuthUI.prototype.reset = function() {
809807
// Clear email link sign-in state from URL if needed.
810808
this.clearEmailSignInState();
811809
// Removes pending status of previous redirect operations including redirect
812-
// back from accountchooser.com and federated sign in.
810+
// back from federated sign in.
813811
firebaseui.auth.storage.removeRedirectStatus(this.getAppId());
814812
// Cancel One-Tap last operation.
815813
this.cancelOneTapSignIn();

javascript/widgets/authui_test.js

-7
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,6 @@ function setUp() {
254254
firebaseui.auth.widget.dispatcher,
255255
'dispatchOperation',
256256
goog.testing.recordFunction());
257-
// Simulate accountchooser.com loaded.
258-
testStubs.set(
259-
firebaseui.auth.widget.handler.common,
260-
'loadAccountchooserJs',
261-
function(app, callback, opt_forceUiShownCallback) {
262-
callback();
263-
});
264257
// Install fake test utilities.
265258
testUtil = new firebaseui.auth.testing.FakeUtil().install();
266259
ignoreArgument = goog.testing.mockmatchers.ignoreArgument;

javascript/widgets/config.js

-10
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ class Config {
3535
constructor() {
3636
/** @const @private {!AuthConfig} The AuthUI config object. */
3737
this.config_ = new AuthConfig();
38-
// Define FirebaseUI widget configurations and convenient getters.
39-
// TODO: This is deprecated and should be removed by Jan 31st, 2021.
40-
this.config_.define('acUiConfig');
4138
this.config_.define('autoUpgradeAnonymousUsers');
4239
this.config_.define('callbacks');
4340
/**
@@ -857,11 +854,6 @@ class Config {
857854
}
858855
const credentialHelper = this.config_.get('credentialHelper');
859856

860-
// Manually set deprecated accountchooser.com to none.
861-
if (credentialHelper === Config.CredentialHelper.ACCOUNT_CHOOSER_COM) {
862-
return Config.CredentialHelper.NONE;
863-
}
864-
865857
// Make sure the credential helper is valid.
866858
for (let key in Config.CredentialHelper) {
867859
if (Config.CredentialHelper[key] === credentialHelper) {
@@ -916,8 +908,6 @@ class Config {
916908
* @enum {string}
917909
*/
918910
Config.CredentialHelper = {
919-
// TODO: accountchooser.com is no longer supported. Remove by Jan 31st, 2021.
920-
ACCOUNT_CHOOSER_COM: 'accountchooser.com',
921911
GOOGLE_YOLO: 'googleyolo',
922912
NONE: 'none',
923913
};

javascript/widgets/exports_app.js

-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ goog.exportSymbol('firebaseui.auth.AuthUIError', firebaseui.auth.AuthUIError);
7979
goog.exportSymbol(
8080
'firebaseui.auth.AuthUIError.prototype.toJSON',
8181
firebaseui.auth.AuthUIError.prototype.toJSON);
82-
goog.exportSymbol(
83-
'firebaseui.auth.CredentialHelper.ACCOUNT_CHOOSER_COM',
84-
firebaseui.auth.widget.Config.CredentialHelper.ACCOUNT_CHOOSER_COM);
8582
goog.exportSymbol(
8683
'firebaseui.auth.CredentialHelper.GOOGLE_YOLO',
8784
firebaseui.auth.widget.Config.CredentialHelper.GOOGLE_YOLO);

javascript/widgets/handler/providersignin_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function setupProviderSignInPage(
8888
'signInFlow': flow,
8989
'credentialHelper': !!enableOneTap ?
9090
firebaseui.auth.widget.Config.CredentialHelper.GOOGLE_YOLO :
91-
firebaseui.auth.widget.Config.CredentialHelper.ACCOUNT_CHOOSER_COM
91+
firebaseui.auth.widget.Config.CredentialHelper.NONE
9292
});
9393
}
9494
// Set sign-in options.

types/index.d.ts

-6
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ interface PhoneSignInOption extends SignInOption {
113113

114114
declare namespace firebaseui.auth {
115115
interface Config {
116-
// This is now a no-op and is deprecated and will be removed by Jan 31st,
117-
// 2021.
118-
acUiConfig?: object;
119116
autoUpgradeAnonymousUsers?: boolean;
120117
callbacks?: Callbacks;
121118
credentialHelper?: CredentialHelperType;
@@ -166,9 +163,6 @@ declare namespace firebaseui.auth {
166163

167164
class CredentialHelper {
168165
private constructor();
169-
// `ACCOUNT_CHOOSER_COM` is deprecated and will be removed by Jan 31st,
170-
// 2021.
171-
static ACCOUNT_CHOOSER_COM: CredentialHelperType;
172166
static GOOGLE_YOLO: CredentialHelperType;
173167
static NONE: CredentialHelperType;
174168
}

0 commit comments

Comments
 (0)