@firebase/auth 0.21.0 → 0.21.1-canary.27b5e7d70

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 +14 -3
  3. package/dist/auth.d.ts +14 -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-100145d2.js} +55 -20
  7. package/dist/cordova/popup_redirect-100145d2.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 +12 -2
  10. package/dist/cordova/test/helpers/mock_auth.d.ts +1 -1
  11. package/dist/esm2017/{index-c6def6da.js → index-8b268dcc.js} +40 -19
  12. package/dist/esm2017/index-8b268dcc.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 +12 -2
  17. package/dist/esm2017/test/helpers/mock_auth.d.ts +1 -1
  18. package/dist/esm5/{index-ef8e1de2.js → index-d0f42d93.js} +55 -20
  19. package/dist/esm5/index-d0f42d93.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 +12 -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-8f4e9d92.js} +10 -12
  28. package/dist/node/{index-2efb81c0.js.map → index-8f4e9d92.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 +12 -2
  34. package/dist/node/test/helpers/mock_auth.d.ts +1 -1
  35. package/dist/node-esm/{index-e0bc98c8.js → index-fe3db70f.js} +16 -17
  36. package/dist/node-esm/{index-e0bc98c8.js.map → index-fe3db70f.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 +12 -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 +46 -9
  45. package/dist/rn/internal.js.map +1 -1
  46. package/dist/rn/{phone-bc99e0b0.js → phone-edfc46b9.js} +10 -12
  47. package/dist/rn/phone-edfc46b9.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 +12 -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 +12 -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,8 @@ 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 {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
24
+ * | best practices} when using {@link signInWithRedirect}.
23
25
  *
24
26
  * @example
25
27
  * ```javascript
@@ -58,6 +60,10 @@ export declare function signInWithRedirect(auth: Auth, provider: AuthProvider, r
58
60
  export declare function _signInWithRedirect(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void | never>;
59
61
  /**
60
62
  * Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.
63
+ * @remarks
64
+ * To handle the results and errors for this operation, refer to {@link getRedirectResult}.
65
+ * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
66
+ * | best practices} when using {@link reauthenticateWithRedirect}.
61
67
  *
62
68
  * @example
63
69
  * ```javascript
@@ -68,8 +74,8 @@ export declare function _signInWithRedirect(auth: Auth, provider: AuthProvider,
68
74
  *
69
75
  * // After returning from the redirect when your app initializes you can obtain the result
70
76
  * const result = await getRedirectResult(auth);
71
- * // Link using a redirect.
72
- * await linkWithRedirect(result.user, provider);
77
+ * // Reauthenticate using a redirect.
78
+ * await reauthenticateWithRedirect(result.user, provider);
73
79
  * // This will again trigger a full page redirect away from your app
74
80
  *
75
81
  * // After returning from the redirect when your app initializes you can obtain the result
@@ -88,6 +94,10 @@ export declare function reauthenticateWithRedirect(user: User, provider: AuthPro
88
94
  export declare function _reauthenticateWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void | never>;
89
95
  /**
90
96
  * Links the {@link OAuthProvider} to the user account using a full-page redirect flow.
97
+ * @remarks
98
+ * To handle the results and errors for this operation, refer to {@link getRedirectResult}.
99
+ * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
100
+ * | best practices} when using {@link linkWithRedirect}.
91
101
  *
92
102
  * @example
93
103
  * ```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,8 @@ 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 {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
24
+ * | best practices} when using {@link signInWithRedirect}.
23
25
  *
24
26
  * @example
25
27
  * ```javascript
@@ -58,6 +60,10 @@ export declare function signInWithRedirect(auth: Auth, provider: AuthProvider, r
58
60
  export declare function _signInWithRedirect(auth: Auth, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void | never>;
59
61
  /**
60
62
  * Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.
63
+ * @remarks
64
+ * To handle the results and errors for this operation, refer to {@link getRedirectResult}.
65
+ * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
66
+ * | best practices} when using {@link reauthenticateWithRedirect}.
61
67
  *
62
68
  * @example
63
69
  * ```javascript
@@ -68,8 +74,8 @@ export declare function _signInWithRedirect(auth: Auth, provider: AuthProvider,
68
74
  *
69
75
  * // After returning from the redirect when your app initializes you can obtain the result
70
76
  * const result = await getRedirectResult(auth);
71
- * // Link using a redirect.
72
- * await linkWithRedirect(result.user, provider);
77
+ * // Reauthenticate using a redirect.
78
+ * await reauthenticateWithRedirect(result.user, provider);
73
79
  * // This will again trigger a full page redirect away from your app
74
80
  *
75
81
  * // After returning from the redirect when your app initializes you can obtain the result
@@ -88,6 +94,10 @@ export declare function reauthenticateWithRedirect(user: User, provider: AuthPro
88
94
  export declare function _reauthenticateWithRedirect(user: User, provider: AuthProvider, resolver?: PopupRedirectResolver): Promise<void | never>;
89
95
  /**
90
96
  * Links the {@link OAuthProvider} to the user account using a full-page redirect flow.
97
+ * @remarks
98
+ * To handle the results and errors for this operation, refer to {@link getRedirectResult}.
99
+ * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices
100
+ * | best practices} when using {@link linkWithRedirect}.
91
101
  *
92
102
  * @example
93
103
  * ```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.27b5e7d70",
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.27b5e7d70"
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.27b5e7d70",
106
+ "@firebase/logger": "0.4.0-canary.27b5e7d70",
107
+ "@firebase/util": "1.9.0-canary.27b5e7d70",
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.27b5e7d70",
114
114
  "@rollup/plugin-json": "4.1.0",
115
115
  "@rollup/plugin-strip": "2.1.0",
116
116
  "chromedriver": "98.0.1",