@firebase/auth 0.21.0 → 0.21.1-canary.68369740a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/auth-public.d.ts +11 -3
  3. package/dist/auth.d.ts +11 -3
  4. package/dist/cordova/index.js +2 -2
  5. package/dist/cordova/internal.js +2 -2
  6. package/dist/cordova/{popup_redirect-b7568081.js → popup_redirect-616e0b14.js} +52 -20
  7. package/dist/cordova/popup_redirect-616e0b14.js.map +1 -0
  8. package/dist/cordova/src/core/strategies/credential.d.ts +2 -1
  9. package/dist/cordova/src/platform_browser/strategies/redirect.d.ts +9 -2
  10. package/dist/cordova/test/helpers/mock_auth.d.ts +1 -1
  11. package/dist/esm2017/{index-c6def6da.js → index-af761b12.js} +37 -19
  12. package/dist/esm2017/index-af761b12.js.map +1 -0
  13. package/dist/esm2017/index.js +1 -1
  14. package/dist/esm2017/internal.js +2 -2
  15. package/dist/esm2017/src/core/strategies/credential.d.ts +2 -1
  16. package/dist/esm2017/src/platform_browser/strategies/redirect.d.ts +9 -2
  17. package/dist/esm2017/test/helpers/mock_auth.d.ts +1 -1
  18. package/dist/esm5/{index-ef8e1de2.js → index-4e4377a9.js} +52 -20
  19. package/dist/esm5/index-4e4377a9.js.map +1 -0
  20. package/dist/esm5/index.js +1 -1
  21. package/dist/esm5/internal.js +2 -2
  22. package/dist/esm5/src/core/strategies/credential.d.ts +2 -1
  23. package/dist/esm5/src/platform_browser/strategies/redirect.d.ts +9 -2
  24. package/dist/esm5/test/helpers/mock_auth.d.ts +1 -1
  25. package/dist/index.webworker.esm5.js +9 -11
  26. package/dist/index.webworker.esm5.js.map +1 -1
  27. package/dist/node/{index-2efb81c0.js → index-edd1794a.js} +10 -12
  28. package/dist/node/{index-2efb81c0.js.map → index-edd1794a.js.map} +1 -1
  29. package/dist/node/index.js +1 -1
  30. package/dist/node/internal.js +1 -1
  31. package/dist/node/internal.js.map +1 -1
  32. package/dist/node/src/core/strategies/credential.d.ts +2 -1
  33. package/dist/node/src/platform_browser/strategies/redirect.d.ts +9 -2
  34. package/dist/node/test/helpers/mock_auth.d.ts +1 -1
  35. package/dist/node-esm/{index-e0bc98c8.js → index-d458390f.js} +16 -17
  36. package/dist/node-esm/{index-e0bc98c8.js.map → index-d458390f.js.map} +1 -1
  37. package/dist/node-esm/index.js +1 -1
  38. package/dist/node-esm/internal.js +2 -2
  39. package/dist/node-esm/internal.js.map +1 -1
  40. package/dist/node-esm/src/core/strategies/credential.d.ts +2 -1
  41. package/dist/node-esm/src/platform_browser/strategies/redirect.d.ts +9 -2
  42. package/dist/node-esm/test/helpers/mock_auth.d.ts +1 -1
  43. package/dist/rn/index.js +1 -1
  44. package/dist/rn/internal.js +43 -9
  45. package/dist/rn/internal.js.map +1 -1
  46. package/dist/rn/{phone-bc99e0b0.js → phone-8afa33ea.js} +10 -12
  47. package/dist/rn/phone-8afa33ea.js.map +1 -0
  48. package/dist/rn/src/core/strategies/credential.d.ts +2 -1
  49. package/dist/rn/src/platform_browser/strategies/redirect.d.ts +9 -2
  50. package/dist/rn/test/helpers/mock_auth.d.ts +1 -1
  51. package/dist/src/core/strategies/credential.d.ts +2 -1
  52. package/dist/src/platform_browser/strategies/redirect.d.ts +9 -2
  53. package/dist/test/helpers/mock_auth.d.ts +1 -1
  54. package/package.json +6 -6
  55. package/dist/cordova/popup_redirect-b7568081.js.map +0 -1
  56. package/dist/esm2017/index-c6def6da.js.map +0 -1
  57. package/dist/esm5/index-ef8e1de2.js.map +0 -1
  58. package/dist/rn/phone-bc99e0b0.js.map +0 -1
@@ -47,7 +47,8 @@ export declare function linkWithCredential(user: User, credential: AuthCredentia
47
47
  *
48
48
  * @remarks
49
49
  * Use before operations such as {@link updatePassword} that require tokens from recent sign-in
50
- * attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error.
50
+ * attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error
51
+ * or a `TOKEN_EXPIRED` error.
51
52
  *
52
53
  * @param user - The user.
53
54
  * @param credential - The auth credential.
@@ -20,6 +20,7 @@ import { Auth, AuthProvider, PopupRedirectResolver, User, UserCredential } from
20
20
  *
21
21
  * @remarks
22
22
  * To handle the results and errors for this operation, refer to {@link getRedirectResult}.
23
+ * Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link signInWithRedirect}.
23
24
  *
24
25
  * @example
25
26
  * ```javascript
@@ -58,6 +59,9 @@ export declare function signInWithRedirect(auth: Auth, provider: AuthProvider, r
58
59
  export declare function _signInWithRedirect(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void | never>;
59
60
  /**
60
61
  * Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.
62
+ * @remarks
63
+ * To handle the results and errors for this operation, refer to {@link getRedirectResult}.
64
+ * Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link reauthenticateWithRedirect}.
61
65
  *
62
66
  * @example
63
67
  * ```javascript
@@ -68,8 +72,8 @@ export declare function _signInWithRedirect(auth: Auth, provider: AuthProvider,
68
72
  *
69
73
  * // After returning from the redirect when your app initializes you can obtain the result
70
74
  * const result = await getRedirectResult(auth);
71
- * // Link using a redirect.
72
- * await linkWithRedirect(result.user, provider);
75
+ * // Reauthenticate using a redirect.
76
+ * await reauthenticateWithRedirect(result.user, provider);
73
77
  * // This will again trigger a full page redirect away from your app
74
78
  *
75
79
  * // After returning from the redirect when your app initializes you can obtain the result
@@ -88,6 +92,9 @@ export declare function reauthenticateWithRedirect(user: User, provider: AuthPro
88
92
  export declare function _reauthenticateWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void | never>;
89
93
  /**
90
94
  * Links the {@link OAuthProvider} to the user account using a full-page redirect flow.
95
+ * @remarks
96
+ * To handle the results and errors for this operation, refer to {@link getRedirectResult}.
97
+ * Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link linkWithRedirect}.
91
98
  *
92
99
  * @example
93
100
  * ```javascript
@@ -38,5 +38,5 @@ export declare class MockPersistenceLayer extends InMemoryPersistence {
38
38
  _set(key: string, object: PersistedBlob): Promise<void>;
39
39
  _remove(key: string): Promise<void>;
40
40
  }
41
- export declare function testAuth(popupRedirectResolver?: PopupRedirectResolver, persistence?: MockPersistenceLayer): Promise<TestAuth>;
41
+ export declare function testAuth(popupRedirectResolver?: PopupRedirectResolver, persistence?: MockPersistenceLayer, skipAwaitOnInit?: boolean): Promise<TestAuth>;
42
42
  export declare function testUser(auth: AuthInternal, uid: string, email?: string, fakeTokens?: boolean): UserInternal;
@@ -47,7 +47,8 @@ export declare function linkWithCredential(user: User, credential: AuthCredentia
47
47
  *
48
48
  * @remarks
49
49
  * Use before operations such as {@link updatePassword} that require tokens from recent sign-in
50
- * attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error.
50
+ * attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error
51
+ * or a `TOKEN_EXPIRED` error.
51
52
  *
52
53
  * @param user - The user.
53
54
  * @param credential - The auth credential.
@@ -20,6 +20,7 @@ import { Auth, AuthProvider, PopupRedirectResolver, User, UserCredential } from
20
20
  *
21
21
  * @remarks
22
22
  * To handle the results and errors for this operation, refer to {@link getRedirectResult}.
23
+ * Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link signInWithRedirect}.
23
24
  *
24
25
  * @example
25
26
  * ```javascript
@@ -58,6 +59,9 @@ export declare function signInWithRedirect(auth: Auth, provider: AuthProvider, r
58
59
  export declare function _signInWithRedirect(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void | never>;
59
60
  /**
60
61
  * Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.
62
+ * @remarks
63
+ * To handle the results and errors for this operation, refer to {@link getRedirectResult}.
64
+ * Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link reauthenticateWithRedirect}.
61
65
  *
62
66
  * @example
63
67
  * ```javascript
@@ -68,8 +72,8 @@ export declare function _signInWithRedirect(auth: Auth, provider: AuthProvider,
68
72
  *
69
73
  * // After returning from the redirect when your app initializes you can obtain the result
70
74
  * const result = await getRedirectResult(auth);
71
- * // Link using a redirect.
72
- * await linkWithRedirect(result.user, provider);
75
+ * // Reauthenticate using a redirect.
76
+ * await reauthenticateWithRedirect(result.user, provider);
73
77
  * // This will again trigger a full page redirect away from your app
74
78
  *
75
79
  * // After returning from the redirect when your app initializes you can obtain the result
@@ -88,6 +92,9 @@ export declare function reauthenticateWithRedirect(user: User, provider: AuthPro
88
92
  export declare function _reauthenticateWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void | never>;
89
93
  /**
90
94
  * Links the {@link OAuthProvider} to the user account using a full-page redirect flow.
95
+ * @remarks
96
+ * To handle the results and errors for this operation, refer to {@link getRedirectResult}.
97
+ * Follow the [best practices](https://firebase.google.com/docs/auth/web/redirect-best-practices) when using {@link linkWithRedirect}.
91
98
  *
92
99
  * @example
93
100
  * ```javascript
@@ -38,5 +38,5 @@ export declare class MockPersistenceLayer extends InMemoryPersistence {
38
38
  _set(key: string, object: PersistedBlob): Promise<void>;
39
39
  _remove(key: string): Promise<void>;
40
40
  }
41
- export declare function testAuth(popupRedirectResolver?: PopupRedirectResolver, persistence?: MockPersistenceLayer): Promise<TestAuth>;
41
+ export declare function testAuth(popupRedirectResolver?: PopupRedirectResolver, persistence?: MockPersistenceLayer, skipAwaitOnInit?: boolean): Promise<TestAuth>;
42
42
  export declare function testUser(auth: AuthInternal, uid: string, email?: string, fakeTokens?: boolean): UserInternal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@firebase/auth",
3
- "version": "0.21.0",
3
+ "version": "0.21.1-canary.68369740a",
4
4
  "description": "The Firebase Authenticaton component of the Firebase JS SDK.",
5
5
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
6
  "main": "dist/node/index.js",
@@ -99,18 +99,18 @@
99
99
  "typings:public": "node ../../scripts/build/use_typings.js ./dist/auth-public.d.ts"
100
100
  },
101
101
  "peerDependencies": {
102
- "@firebase/app": "0.x"
102
+ "@firebase/app": "0.9.1-canary.68369740a"
103
103
  },
104
104
  "dependencies": {
105
- "@firebase/component": "0.6.0",
106
- "@firebase/logger": "0.4.0",
107
- "@firebase/util": "1.8.0",
105
+ "@firebase/component": "0.6.1-canary.68369740a",
106
+ "@firebase/logger": "0.4.0-canary.68369740a",
107
+ "@firebase/util": "1.9.0-canary.68369740a",
108
108
  "node-fetch": "2.6.7",
109
109
  "tslib": "^2.1.0"
110
110
  },
111
111
  "license": "Apache-2.0",
112
112
  "devDependencies": {
113
- "@firebase/app": "0.9.0",
113
+ "@firebase/app": "0.9.1-canary.68369740a",
114
114
  "@rollup/plugin-json": "4.1.0",
115
115
  "@rollup/plugin-strip": "2.1.0",
116
116
  "chromedriver": "98.0.1",