@pageproof/sdk-pr 476.0.1669764968949 → 476.0.1669768210224
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default AccountsMagicLinks;
|
|
2
2
|
/**
|
|
3
|
-
* The Accounts Magic
|
|
3
|
+
* The Accounts Magic Links API.
|
|
4
4
|
*
|
|
5
5
|
* This API is experimental. Please contact your PageProof SDK account manager for assistance.
|
|
6
6
|
*/
|
|
@@ -13,12 +13,13 @@ declare class AccountsMagicLinks extends API {
|
|
|
13
13
|
*
|
|
14
14
|
* This is otherwise known as a "manual login". A manual login requires the magic link to be consumed by the same
|
|
15
15
|
* device that generated it. The `nonce` property returned by this function should be stored locally, temporarily, and
|
|
16
|
-
* passed to the {@link login} function when the magic link is consumed.
|
|
16
|
+
* passed to the {@link AccountsMagicLinks.login} function when the magic link is consumed.
|
|
17
17
|
*
|
|
18
18
|
* The nonce should never be manually transmitted over the network!
|
|
19
19
|
*
|
|
20
20
|
* The `id` property returned by this function can be used to verify the magic link was generated for the same device.
|
|
21
|
-
* It should match the one returned by {@link parseMagicLink}. If it doesn't - calling
|
|
21
|
+
* It should match the one returned by {@link AccountsMagicLinks.parseMagicLink}. If it doesn't - calling
|
|
22
|
+
* {@link AccountsMagicLinks.login} will error.
|
|
22
23
|
*
|
|
23
24
|
* @param {string} email The email address to send the magic link to.
|
|
24
25
|
* @returns {Promise<MagicLinkRequest>}
|
|
@@ -39,14 +40,14 @@ declare class AccountsMagicLinks extends API {
|
|
|
39
40
|
* The `requiresNonce` property tells you whether a pre-generated nonce is required for logging in.
|
|
40
41
|
*
|
|
41
42
|
* @param {string} url The URL to parse.
|
|
42
|
-
* @returns {MagicLinkParsedURL
|
|
43
|
+
* @returns {MagicLinkParsedURL|null}
|
|
43
44
|
*/
|
|
44
45
|
parseMagicLink(url: string): MagicLinkParsedURL;
|
|
45
46
|
/**
|
|
46
47
|
* Creates a session from a magic link.
|
|
47
48
|
*
|
|
48
49
|
* If the nonce is not supplied, a nonce will be generated on the fly. You can check whether a nonce is required by
|
|
49
|
-
* calling {@link parseMagicLink} and checking the `requiresNonce` property from the result.
|
|
50
|
+
* calling {@link AccountsMagicLinks.parseMagicLink} and checking the `requiresNonce` property from the result.
|
|
50
51
|
*
|
|
51
52
|
* @param {string} token The magic token - parsed by calling `parseUrl`.
|
|
52
53
|
* @param {MagicLinkNonce} [nonce] The nonce to use to decrypt the session credentials.
|
|
@@ -56,7 +57,7 @@ declare class AccountsMagicLinks extends API {
|
|
|
56
57
|
/**
|
|
57
58
|
* Logs in using a magic link.
|
|
58
59
|
*
|
|
59
|
-
* @see {@link getSession} for more information.
|
|
60
|
+
* @see {@link AccountsMagicLinks.getSession} for more information.
|
|
60
61
|
* @param {string} token The magic token - parsed by calling `parseUrl`.
|
|
61
62
|
* @param {MagicLinkNonce} [nonce] The nonce to use to decrypt the session credentials.
|
|
62
63
|
* @returns {Promise<Session>}
|