Merge pull request #14554 from supabase/km/update-tsdocs

fix: update auth docs
This commit is contained in:
Kang Ming authored and GitHub committed 2023-05-26 08:36:39 +02:00
commit 2eabb68216
15 files changed
+66092 -57944

No files matched your search

+69 -47
View File
@@ -457,6 +457,13 @@
"product": "auth",
"type": "function"
},
{
"id": "reset-password-for-email",
"title": "Send a password reset request",
"slug": "auth-resetpasswordforemail",
"product": "auth",
"type": "function"
},
{
"id": "session",
"title": "Retrieve a session",
@@ -541,6 +548,20 @@
"product": "auth",
"type": "function"
},
{
"id": "send-password-reauthentication",
"title": "Send a password reauthentication nonce",
"slug": "auth-reauthentication",
"product": "auth",
"type": "function"
},
{
"id": "resend-email-or-phone-otps",
"title": "Resend an OTP",
"slug": "auth-resend",
"product": "auth",
"type": "function"
},
{
"id": "set-session",
"title": "Set the session data",
@@ -563,46 +584,54 @@
"type": "function"
},
{
"id": "mfa-enroll",
"title": "Enroll a factor",
"slug": "auth-mfa-enroll",
"product": "auth",
"type": "function"
},
{
"id": "mfa-challenge",
"title": "Create a challenge",
"slug": "auth-mfa-challenge",
"product": "auth",
"type": "function"
},
{
"id": "mfa-verify",
"title": "Verify a challenge",
"slug": "auth-mfa-verify",
"product": "auth",
"type": "function"
},
{
"id": "mfa-challenge-and-verify",
"title": "Create and verify a challenge",
"slug": "auth-mfa-challengeandverify",
"product": "auth",
"type": "function"
},
{
"id": "mfa-unenroll",
"title": "Unenroll a factor",
"slug": "auth-mfa-unenroll",
"product": "auth",
"type": "function"
},
{
"id": "mfa-get-authenticator-assurance-level",
"title": "Get Authenticator Assurance Level",
"slug": "auth-mfa-getauthenticatorassurancelevel",
"product": "auth",
"type": "function"
"id": "auth-mfa-api",
"title": "Auth MFA",
"slug": "auth-mfa-api",
"type": "function",
"items": [
{
"id": "mfa-enroll",
"title": "Enroll a factor",
"slug": "auth-mfa-enroll",
"product": "auth",
"type": "function"
},
{
"id": "mfa-challenge",
"title": "Create a challenge",
"slug": "auth-mfa-challenge",
"product": "auth",
"type": "function"
},
{
"id": "mfa-verify",
"title": "Verify a challenge",
"slug": "auth-mfa-verify",
"product": "auth",
"type": "function"
},
{
"id": "mfa-challenge-and-verify",
"title": "Create and verify a challenge",
"slug": "auth-mfa-challengeandverify",
"product": "auth",
"type": "function"
},
{
"id": "mfa-unenroll",
"title": "Unenroll a factor",
"slug": "auth-mfa-unenroll",
"product": "auth",
"type": "function"
},
{
"id": "mfa-get-authenticator-assurance-level",
"title": "Get Authenticator Assurance Level",
"slug": "auth-mfa-getauthenticatorassurancelevel",
"product": "auth",
"type": "function"
}
]
},
{
"id": "admin-api",
@@ -645,13 +674,6 @@
"product": "auth-admin",
"type": "function"
},
{
"id": "reset-password-for-email",
"title": "Send a password reset request",
"slug": "auth-admin-resetpasswordforemail",
"product": "auth-admin",
"type": "function"
},
{
"id": "generate-link",
"title": "Generate an email link",
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -187,7 +187,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [8, 7]
"children": [
8,
7
]
}
]
}
@@ -621,7 +624,11 @@
{
"title": "Properties",
"kind": 1024,
"children": [35, 30, 34]
"children": [
35,
30,
34
]
}
],
"sources": [
@@ -712,17 +719,26 @@
{
"title": "Constructors",
"kind": 512,
"children": [2]
"children": [
2
]
},
{
"title": "Properties",
"kind": 1024,
"children": [15, 14, 13]
"children": [
15,
14,
13
]
},
{
"title": "Methods",
"kind": 2048,
"children": [23, 20]
"children": [
23,
20
]
}
],
"sources": [
@@ -837,12 +853,16 @@
{
"title": "Constructors",
"kind": 512,
"children": [37]
"children": [
37
]
},
{
"title": "Properties",
"kind": 1024,
"children": [42]
"children": [
42
]
}
],
"sources": [
@@ -964,12 +984,16 @@
{
"title": "Constructors",
"kind": 512,
"children": [44]
"children": [
44
]
},
{
"title": "Properties",
"kind": 1024,
"children": [47]
"children": [
47
]
}
],
"sources": [
@@ -1073,12 +1097,16 @@
{
"title": "Constructors",
"kind": 512,
"children": [49]
"children": [
49
]
},
{
"title": "Properties",
"kind": 1024,
"children": [52]
"children": [
52
]
}
],
"sources": [
@@ -1182,12 +1210,16 @@
{
"title": "Constructors",
"kind": 512,
"children": [54]
"children": [
54
]
},
{
"title": "Properties",
"kind": 1024,
"children": [57]
"children": [
57
]
}
],
"sources": [
@@ -1417,7 +1449,11 @@
{
"title": "Properties",
"kind": 1024,
"children": [35, 30, 34]
"children": [
35,
30,
34
]
}
],
"sources": [
@@ -1454,7 +1490,10 @@
],
"type": {
"type": "union",
"types": [null, null]
"types": [
null,
null
]
}
}
],
@@ -1462,12 +1501,21 @@
{
"title": "Classes",
"kind": 128,
"children": [1, 36, 43, 48, 53]
"children": [
1,
36,
43,
48,
53
]
},
{
"title": "Type Aliases",
"kind": 4194304,
"children": [28, 58]
"children": [
28,
58
]
}
],
"sources": [
@@ -1477,4 +1525,4 @@
"character": 0
}
]
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -75,17 +75,32 @@
{
"title": "Constructors",
"kind": 512,
"children": [537]
"children": [
537
]
},
{
"title": "Properties",
"kind": 1024,
"children": [545, 548, 543, 553, 541, 544, 546, 547, 542]
"children": [
545,
548,
543,
553,
541,
544,
546,
547,
542
]
},
{
"title": "Methods",
"kind": 2048,
"children": [556, 554]
"children": [
556,
554
]
}
],
"sources": [
@@ -729,17 +744,32 @@
{
"title": "Constructors",
"kind": 512,
"children": [537]
"children": [
537
]
},
{
"title": "Properties",
"kind": 1024,
"children": [545, 548, 543, 553, 541, 544, 546, 547, 542]
"children": [
545,
548,
543,
553,
541,
544,
546,
547,
542
]
},
{
"title": "Methods",
"kind": 2048,
"children": [556, 554]
"children": [
556,
554
]
}
],
"sources": [
@@ -1121,7 +1151,11 @@
{
"title": "Properties",
"kind": 1024,
"children": [12, 10, 11]
"children": [
12,
10,
11
]
}
]
}
@@ -1680,7 +1714,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [45, 44]
"children": [
45,
44
]
}
]
}
@@ -1798,17 +1835,27 @@
{
"title": "Constructors",
"kind": 512,
"children": [2]
"children": [
2
]
},
{
"title": "Properties",
"kind": 1024,
"children": [20, 18, 19, 17]
"children": [
20,
18,
19,
17
]
},
{
"title": "Methods",
"kind": 2048,
"children": [25, 36]
"children": [
25,
36
]
}
],
"sources": [
@@ -2682,17 +2729,32 @@
{
"title": "Constructors",
"kind": 512,
"children": [537]
"children": [
537
]
},
{
"title": "Properties",
"kind": 1024,
"children": [545, 548, 543, 553, 541, 544, 546, 547, 542]
"children": [
545,
548,
543,
553,
541,
544,
546,
547,
542
]
},
{
"title": "Methods",
"kind": 2048,
"children": [556, 554]
"children": [
556,
554
]
}
],
"sources": [
@@ -4039,7 +4101,14 @@
{
"title": "Properties",
"kind": 1024,
"children": [396, 399, 401, 398, 397, 400]
"children": [
396,
399,
401,
398,
397,
400
]
}
]
}
@@ -6209,7 +6278,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [371]
"children": [
371
]
}
]
}
@@ -7270,7 +7341,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [334]
"children": [
334
]
}
]
}
@@ -7451,7 +7524,11 @@
{
"title": "Properties",
"kind": 1024,
"children": [356, 358, 357]
"children": [
356,
358,
357
]
}
]
}
@@ -7603,7 +7680,11 @@
{
"title": "Properties",
"kind": 1024,
"children": [363, 365, 364]
"children": [
363,
365,
364
]
}
]
}
@@ -7932,7 +8013,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [378]
"children": [
378
]
}
]
}
@@ -9238,7 +9321,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [304, 305]
"children": [
304,
305
]
}
]
}
@@ -9390,7 +9476,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [311, 312]
"children": [
311,
312
]
}
]
}
@@ -9730,20 +9819,70 @@
{
"title": "Constructors",
"kind": 512,
"children": [115]
"children": [
115
]
},
{
"title": "Properties",
"kind": 1024,
"children": [411, 414, 409, 419, 407, 410, 412, 413, 408]
"children": [
411,
414,
409,
419,
407,
410,
412,
413,
408
]
},
{
"title": "Methods",
"kind": 2048,
"children": [
379, 241, 233, 388, 121, 392, 335, 390, 137, 145, 193, 201, 209, 225, 217, 169, 177,
185, 366, 153, 161, 313, 385, 129, 319, 329, 350, 289, 372, 281, 249, 257, 265, 273,
404, 402, 345, 382, 297, 422, 420
379,
241,
233,
388,
121,
392,
335,
390,
137,
145,
193,
201,
209,
225,
217,
169,
177,
185,
366,
153,
161,
313,
385,
129,
319,
329,
350,
289,
372,
281,
249,
257,
265,
273,
404,
402,
345,
382,
297,
422,
420
]
}
],
@@ -10058,7 +10197,11 @@
{
"title": "Properties",
"kind": 1024,
"children": [59, 57, 58]
"children": [
59,
57,
58
]
}
]
}
@@ -10352,7 +10495,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [111]
"children": [
111
]
}
]
}
@@ -10552,7 +10697,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [88, 89]
"children": [
88,
89
]
}
]
}
@@ -10768,7 +10916,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [81, 80]
"children": [
81,
80
]
}
]
}
@@ -10937,7 +11088,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [106]
"children": [
106
]
}
]
}
@@ -11183,7 +11336,12 @@
{
"title": "Properties",
"kind": 1024,
"children": [98, 99, 97, 96]
"children": [
98,
99,
97,
96
]
}
]
}
@@ -11227,17 +11385,31 @@
{
"title": "Constructors",
"kind": 512,
"children": [50]
"children": [
50
]
},
{
"title": "Properties",
"kind": 1024,
"children": [68, 65, 66, 67, 64]
"children": [
68,
65,
66,
67,
64
]
},
{
"title": "Methods",
"kind": 2048,
"children": [107, 82, 73, 100, 90]
"children": [
107,
82,
73,
100,
90
]
}
],
"sources": [
@@ -12014,17 +12186,32 @@
{
"title": "Constructors",
"kind": 512,
"children": [537]
"children": [
537
]
},
{
"title": "Properties",
"kind": 1024,
"children": [545, 548, 543, 553, 541, 544, 546, 547, 542]
"children": [
545,
548,
543,
553,
541,
544,
546,
547,
542
]
},
{
"title": "Methods",
"kind": 2048,
"children": [556, 554]
"children": [
556,
554
]
}
],
"sources": [
@@ -12745,7 +12932,14 @@
{
"title": "Properties",
"kind": 1024,
"children": [495, 498, 500, 497, 496, 499]
"children": [
495,
498,
500,
497,
496,
499
]
}
]
}
@@ -12932,7 +13126,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [470]
"children": [
470
]
}
]
}
@@ -13193,7 +13389,11 @@
{
"title": "Properties",
"kind": 1024,
"children": [455, 457, 456]
"children": [
455,
457,
456
]
}
]
}
@@ -13340,7 +13540,11 @@
{
"title": "Properties",
"kind": 1024,
"children": [462, 464, 463]
"children": [
462,
464,
463
]
}
]
}
@@ -13471,7 +13675,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [477]
"children": [
477
]
}
]
}
@@ -14109,17 +14315,44 @@
{
"title": "Constructors",
"kind": 512,
"children": [438]
"children": [
438
]
},
{
"title": "Properties",
"kind": 1024,
"children": [510, 513, 508, 518, 506, 509, 511, 512, 507]
"children": [
510,
513,
508,
518,
506,
509,
511,
512,
507
]
},
{
"title": "Methods",
"kind": 2048,
"children": [478, 487, 491, 489, 465, 484, 449, 471, 503, 501, 444, 481, 521, 519]
"children": [
478,
487,
491,
489,
465,
484,
449,
471,
503,
501,
444,
481,
521,
519
]
}
],
"sources": [
@@ -14357,7 +14590,12 @@
{
"title": "Properties",
"kind": 1024,
"children": [593, 591, 592, 590]
"children": [
593,
591,
592,
590
]
}
],
"sources": [
@@ -14421,7 +14659,13 @@
{
"title": "Properties",
"kind": 1024,
"children": [574, 573, 572, 575, 576]
"children": [
574,
573,
572,
575,
576
]
}
],
"sources": [
@@ -14559,7 +14803,13 @@
{
"title": "Properties",
"kind": 1024,
"children": [580, 579, 578, 581, 582]
"children": [
580,
579,
578,
581,
582
]
}
],
"sources": [
@@ -14688,7 +14938,12 @@
{
"title": "Properties",
"kind": 1024,
"children": [593, 591, 592, 590]
"children": [
593,
591,
592,
590
]
}
],
"sources": [
@@ -14929,7 +15184,13 @@
{
"title": "Properties",
"kind": 1024,
"children": [580, 579, 578, 581, 582]
"children": [
580,
579,
578,
581,
582
]
}
],
"sources": [
@@ -15118,7 +15379,12 @@
{
"title": "Properties",
"kind": 1024,
"children": [593, 591, 592, 590]
"children": [
593,
591,
592,
590
]
}
],
"sources": [
@@ -15182,7 +15448,13 @@
{
"title": "Properties",
"kind": 1024,
"children": [574, 573, 572, 575, 576]
"children": [
574,
573,
572,
575,
576
]
}
],
"sources": [
@@ -15207,17 +15479,31 @@
{
"title": "Classes",
"kind": 128,
"children": [536, 1, 114, 49, 437]
"children": [
536,
1,
114,
49,
437
]
},
{
"title": "Interfaces",
"kind": 256,
"children": [571, 577]
"children": [
571,
577
]
},
{
"title": "Type Aliases",
"kind": 4194304,
"children": [588, 586, 569, 584]
"children": [
588,
586,
569,
584
]
}
],
"sources": [
@@ -15227,4 +15513,4 @@
"character": 0
}
]
}
}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -433,7 +433,14 @@
{
"title": "Properties",
"kind": 1024,
"children": [68, 71, 73, 70, 72, 69]
"children": [
68,
71,
73,
70,
72,
69
]
}
],
"sources": [
@@ -500,7 +507,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [65]
"children": [
65
]
}
],
"sources": [
@@ -625,7 +634,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [77, 78]
"children": [
77,
78
]
}
],
"sources": [
@@ -668,7 +680,12 @@
{
"title": "Properties",
"kind": 1024,
"children": [66, 63, 75, 74]
"children": [
66,
63,
75,
74
]
}
],
"sources": [
@@ -2140,7 +2157,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [158, 157]
"children": [
158,
157
]
}
]
}
@@ -2258,22 +2278,53 @@
{
"title": "Constructors",
"kind": 512,
"children": [106]
"children": [
106
]
},
{
"title": "Properties",
"kind": 1024,
"children": [114, 117, 127, 122, 119, 128, 115, 116, 120, 121, 118, 133, 132]
"children": [
114,
117,
127,
122,
119,
128,
115,
116,
120,
121,
118,
133,
132
]
},
{
"title": "Accessors",
"kind": 262144,
"children": [134, 136]
"children": [
134,
136
]
},
{
"title": "Methods",
"kind": 2048,
"children": [170, 187, 181, 172, 184, 159, 138, 163, 168, 165, 149]
"children": [
170,
187,
181,
172,
184,
159,
138,
163,
168,
165,
149
]
}
],
"sources": [
@@ -2799,7 +2850,14 @@
{
"title": "Properties",
"kind": 1024,
"children": [68, 71, 73, 70, 72, 69]
"children": [
68,
71,
73,
70,
72,
69
]
}
],
"sources": [
@@ -2866,7 +2924,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [65]
"children": [
65
]
}
],
"sources": [
@@ -2991,7 +3051,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [77, 78]
"children": [
77,
78
]
}
],
"sources": [
@@ -3034,7 +3097,12 @@
{
"title": "Properties",
"kind": 1024,
"children": [66, 63, 75, 74]
"children": [
66,
63,
75,
74
]
}
],
"sources": [
@@ -3080,17 +3148,23 @@
{
"title": "References",
"kind": 16777216,
"children": [195]
"children": [
195
]
},
{
"title": "Classes",
"kind": 128,
"children": [105]
"children": [
105
]
},
{
"title": "Functions",
"kind": 64,
"children": [2]
"children": [
2
]
}
],
"sources": [
@@ -3156,7 +3230,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [13]
"children": [
13
]
}
]
}
@@ -3168,7 +3244,9 @@
{
"title": "Variables",
"kind": 32,
"children": [11]
"children": [
11
]
}
],
"sources": [
@@ -3646,7 +3724,11 @@
{
"title": "Functions",
"kind": 64,
"children": [29, 15, 26]
"children": [
29,
15,
26
]
}
],
"sources": [
@@ -3978,7 +4060,14 @@
{
"title": "Properties",
"kind": 1024,
"children": [68, 71, 73, 70, 72, 69]
"children": [
68,
71,
73,
70,
72,
69
]
}
],
"sources": [
@@ -4045,7 +4134,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [65]
"children": [
65
]
}
],
"sources": [
@@ -4170,7 +4261,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [77, 78]
"children": [
77,
78
]
}
],
"sources": [
@@ -4213,7 +4307,12 @@
{
"title": "Properties",
"kind": 1024,
"children": [66, 63, 75, 74]
"children": [
66,
63,
75,
74
]
}
],
"sources": [
@@ -4458,7 +4557,14 @@
{
"title": "Properties",
"kind": 1024,
"children": [68, 71, 73, 70, 72, 69]
"children": [
68,
71,
73,
70,
72,
69
]
}
],
"sources": [
@@ -4525,7 +4631,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [65]
"children": [
65
]
}
],
"sources": [
@@ -4650,7 +4758,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [77, 78]
"children": [
77,
78
]
}
],
"sources": [
@@ -4693,7 +4804,12 @@
{
"title": "Properties",
"kind": 1024,
"children": [66, 63, 75, 74]
"children": [
66,
63,
75,
74
]
}
],
"sources": [
@@ -4823,7 +4939,12 @@
{
"title": "Functions",
"kind": 64,
"children": [50, 56, 47, 45]
"children": [
50,
56,
47,
45
]
}
],
"sources": [
@@ -4960,7 +5081,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [96, 97]
"children": [
96,
97
]
}
],
"sources": [
@@ -5030,7 +5154,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [92]
"children": [
92
]
}
],
"sources": [
@@ -5163,7 +5289,11 @@
{
"title": "Properties",
"kind": 1024,
"children": [102, 100, 101]
"children": [
102,
100,
101
]
}
],
"sources": [
@@ -5293,7 +5423,11 @@
{
"title": "Properties",
"kind": 1024,
"children": [83, 82, 84]
"children": [
83,
82,
84
]
}
],
"sources": [
@@ -5423,7 +5557,11 @@
{
"title": "Properties",
"kind": 1024,
"children": [88, 87, 89]
"children": [
88,
87,
89
]
}
],
"sources": [
@@ -5569,7 +5707,11 @@
{
"title": "Properties",
"kind": 1024,
"children": [88, 87, 89]
"children": [
88,
87,
89
]
}
],
"sources": [
@@ -5639,7 +5781,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [92]
"children": [
92
]
}
],
"sources": [
@@ -5869,7 +6013,14 @@
{
"title": "Properties",
"kind": 1024,
"children": [68, 71, 73, 70, 72, 69]
"children": [
68,
71,
73,
70,
72,
69
]
}
],
"sources": [
@@ -5936,7 +6087,9 @@
{
"title": "Properties",
"kind": 1024,
"children": [65]
"children": [
65
]
}
],
"sources": [
@@ -6061,7 +6214,10 @@
{
"title": "Properties",
"kind": 1024,
"children": [77, 78]
"children": [
77,
78
]
}
],
"sources": [
@@ -6104,7 +6260,12 @@
{
"title": "Properties",
"kind": 1024,
"children": [66, 63, 75, 74]
"children": [
66,
63,
75,
74
]
}
],
"sources": [
@@ -6122,12 +6283,23 @@
{
"title": "Interfaces",
"kind": 256,
"children": [59]
"children": [
59
]
},
{
"title": "Type Aliases",
"kind": 4194304,
"children": [60, 94, 90, 98, 80, 85, 93, 61]
"children": [
60,
94,
90,
98,
80,
85,
93,
61
]
}
],
"sources": [
@@ -6171,7 +6343,9 @@
{
"title": "Variables",
"kind": 32,
"children": [104]
"children": [
104
]
}
],
"sources": [
@@ -6187,7 +6361,14 @@
{
"title": "Modules",
"kind": 2,
"children": [1, 10, 14, 44, 58, 103]
"children": [
1,
10,
14,
44,
58,
103
]
}
]
}
}
+89
View File
@@ -465,6 +465,82 @@ functions:
data: { hello: 'world' }
})
```
- id: update-password-with-reauthentication
name: Update the user's password with a nonce
description: If "Secure password change" is enabled, updating the user's password would require a nonce. The nonce is sent to the user's email or phone number.
isSpotlight: true
code: |
```js
const { data, error } = await supabase.auth.updateUser({
password: 'new password',
nonce: '123456'
})
```
- id: send-password-reauthentication
title: 'reauthenticate()'
$ref: '@supabase/gotrue-js.GoTrueClient.reauthenticate'
notes: |
- This method is used together with `updateUser()` when a user's password needs to be updated.
- This method will send a nonce to the user's email. If the user doesn't have a confirmed email address, the method will send the nonce to the user's confirmed phone number instead.
examples:
- id: send-reauthentication-nonce
name: Send reauthentication nonce
description: Sends a reauthentication nonce to the user's email or phone number.
isSpotlight: true
code: |
```js
const { data, error } = await supabase.auth.reauthenticate()
```
- id: resend-email-or-phone-otps
title: 'resend()'
$ref: '@supabase/gotrue-js.GoTrueClient.resend'
notes: |
- Resends a signup confirmation, email change or phone change email to the user.
- Passwordless sign-ins can be resent by calling the `signInWithOtp()` method again.
- Password recovery emails can be resent by calling the `resetPassswordForEmail()` method again.
- This method will only resend an email or phone OTP to the user if there was an initial signup, email change or phone change request being made.
examples:
- id: resend-email-signup-confirmation
name: Resend an email signup confirmation
description: Resends the email signup confirmation to the user
isSpotlight: true
code: |
```js
const { data, error } = await supabase.auth.resend({
type: 'signup',
email: 'email@example.com'
})
```
- id: resend-phone-signup-confirmation
name: Resend a phone signup confirmation
description: Resends the phone signup confirmation email to the user
code: |
```js
const { data, error } = await supabase.auth.resend({
type: 'sms',
phone: '1234567890'
})
```
- id: resend-email-change-email
name: Resend email change email
description: Resends the email change email to the user
code: |
```js
const { data, error } = await supabase.auth.resend({
type: 'email_change',
email: 'email@example.com'
})
```
- id: resend-phone-change
name: Resend phone change OTP
description: Resends the phone change OTP to the user
code: |
```js
const { data, error } = await supabase.auth.resend({
type: 'phone_change',
phone: '1234567890'
})
```
- id: set-session
title: 'setSession()'
$ref: '@supabase/gotrue-js.GoTrueClient.setSession'
@@ -583,7 +659,14 @@ functions:
```js
supabase.auth.exchangeCodeForSession('34e770dd-9ff9-416c-87fa-43b31d7ef225')
```
- id: auth-mfa-api
title: 'Overview'
notes: |
This section contains methods commonly used for Multi-Factor Authentication (MFA) and are invoked behind the `supabase.auth.mfa` namespace.
Currently, we only support time-based one-time password (TOTP) as the 2nd factor. We don't support recovery codes but we allow users to enroll more than 1 TOTP factor, with an upper limit of 10.
Having a 2nd TOTP factor for recovery frees the user of the burden of having to store their recovery codes somewhere. It also reduces the attack surface since multiple recovery codes are usually generated compared to just having 1 backup TOTP factor.
- id: mfa-enroll
title: 'mfa.enroll()'
$ref: '@supabase/gotrue-js.GoTrueMFAApi.enroll'
@@ -757,6 +840,8 @@ functions:
$ref: '@supabase/gotrue-js.GoTrueAdminApi.createUser'
notes: |
- To confirm the user's email address or phone number, set `email_confirm` or `phone_confirm` to true. Both arguments default to false.
- `createUser()` will not send a confirmation email to the user. You can use [`inviteUserByEmail()`](/docs/reference/javascript/auth-admin-inviteuserbyemail) if you want to send them an email invite instead.
- If you are sure that the created user's email or phone number is legitimate and verified, you can set the `email_confirm` or `phone_confirm` param to `true`.
examples:
- id: create-a-new-user-with-custom-user-metadata
name: With custom user metadata
@@ -878,6 +963,10 @@ functions:
- id: generate-link
title: 'generateLink()'
$ref: '@supabase/gotrue-js.GoTrueAdminApi.generateLink'
notes: |
- The following types can be passed into `generateLink()`: `signup`, `magiclink`, `invite`, `recovery`, `email_change_current`, `email_change_new`, `phone_change`.
- `generateLink()` only generates the email link for `email_change_email` if the "Secure email change" setting is enabled under the "Email" provider in your Supabase project.
- `generateLink()` handles the creation of the user for `signup`, `invite` and `magiclink`.
examples:
- id: generate-a-signup-link
name: Generate a signup link