Skip to content

Commit a96d3e2

Browse files
committed
Revert auth changes from bad merge
1 parent 411797c commit a96d3e2

File tree

5 files changed

+19
-77
lines changed

5 files changed

+19
-77
lines changed

packages/auth-interop-types/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/auth-interop-types/index.d.ts

Lines changed: 0 additions & 35 deletions
This file was deleted.

packages/auth-interop-types/package.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

packages/auth-interop-types/tsconfig.json

Lines changed: 0 additions & 9 deletions
This file was deleted.

packages/auth/src/exports_auth.js

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -618,10 +618,27 @@ fireauth.exportlib.exportFunction(
618618

619619
(function() {
620620
if (typeof firebase === 'undefined' || !firebase.INTERNAL ||
621-
!firebase.INTERNAL.registerComponent) {
621+
!firebase.INTERNAL.registerService) {
622622
throw new Error('Cannot find the firebase namespace; be sure to include ' +
623623
'firebase-app.js before this library.');
624624
} else {
625+
/** @type {!firebase.ServiceFactory} */
626+
var factory = function(app, extendApp) {
627+
var auth = new fireauth.Auth(app);
628+
extendApp({
629+
'INTERNAL': {
630+
// Extend app.INTERNAL.getUid.
631+
'getUid': goog.bind(auth.getUid, auth),
632+
'getToken': goog.bind(auth.getIdTokenInternal, auth),
633+
'addAuthTokenListener':
634+
goog.bind(auth.addAuthTokenListenerInternal, auth),
635+
'removeAuthTokenListener':
636+
goog.bind(auth.removeAuthTokenListenerInternal, auth)
637+
}
638+
});
639+
return auth;
640+
};
641+
625642
var namespace = {
626643
// Exports firebase.auth.ActionCodeInfo.Operation.
627644
'ActionCodeInfo': {
@@ -711,4 +728,4 @@ fireauth.exportlib.exportFunction(
711728
'User': fireauth.AuthUser
712729
});
713730
}
714-
})();
731+
})();

0 commit comments

Comments
 (0)