@supabase/gotrue-js 2.100.0-rc.0 → 2.100.1
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.
- package/dist/main/GoTrueAdminApi.d.ts +449 -0
- package/dist/main/GoTrueAdminApi.d.ts.map +1 -1
- package/dist/main/GoTrueAdminApi.js +449 -0
- package/dist/main/GoTrueAdminApi.js.map +1 -1
- package/dist/main/GoTrueClient.d.ts +1668 -63
- package/dist/main/GoTrueClient.d.ts.map +1 -1
- package/dist/main/GoTrueClient.js +1889 -70
- package/dist/main/GoTrueClient.js.map +1 -1
- package/dist/main/lib/locks.d.ts.map +1 -1
- package/dist/main/lib/locks.js +69 -39
- package/dist/main/lib/locks.js.map +1 -1
- package/dist/main/lib/types.d.ts +409 -0
- package/dist/main/lib/types.d.ts.map +1 -1
- package/dist/main/lib/types.js.map +1 -1
- package/dist/main/lib/version.d.ts +1 -1
- package/dist/main/lib/version.d.ts.map +1 -1
- package/dist/main/lib/version.js +1 -1
- package/dist/main/lib/version.js.map +1 -1
- package/dist/module/GoTrueAdminApi.d.ts +449 -0
- package/dist/module/GoTrueAdminApi.d.ts.map +1 -1
- package/dist/module/GoTrueAdminApi.js +449 -0
- package/dist/module/GoTrueAdminApi.js.map +1 -1
- package/dist/module/GoTrueClient.d.ts +1668 -63
- package/dist/module/GoTrueClient.d.ts.map +1 -1
- package/dist/module/GoTrueClient.js +1889 -70
- package/dist/module/GoTrueClient.js.map +1 -1
- package/dist/module/lib/locks.d.ts.map +1 -1
- package/dist/module/lib/locks.js +69 -39
- package/dist/module/lib/locks.js.map +1 -1
- package/dist/module/lib/types.d.ts +409 -0
- package/dist/module/lib/types.d.ts.map +1 -1
- package/dist/module/lib/types.js.map +1 -1
- package/dist/module/lib/version.d.ts +1 -1
- package/dist/module/lib/version.d.ts.map +1 -1
- package/dist/module/lib/version.js +1 -1
- package/dist/module/lib/version.js.map +1 -1
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/GoTrueAdminApi.ts +449 -0
- package/src/GoTrueClient.ts +1889 -70
- package/src/lib/locks.ts +92 -54
- package/src/lib/types.ts +409 -0
- package/src/lib/version.ts +1 -1
package/src/lib/types.ts
CHANGED
|
@@ -1258,6 +1258,77 @@ export interface GoTrueMFAApi {
|
|
|
1258
1258
|
* The user has to enter the code from their authenticator app to verify it.
|
|
1259
1259
|
*
|
|
1260
1260
|
* Upon verifying a factor, all other sessions are logged out and the current session's authenticator level is promoted to `aal2`.
|
|
1261
|
+
*
|
|
1262
|
+
* @category Auth
|
|
1263
|
+
*
|
|
1264
|
+
* @remarks
|
|
1265
|
+
* - Use `totp` or `phone` as the `factorType` and use the returned `id` to create a challenge.
|
|
1266
|
+
* - To create a challenge, see [`mfa.challenge()`](/docs/reference/javascript/auth-mfa-challenge).
|
|
1267
|
+
* - To verify a challenge, see [`mfa.verify()`](/docs/reference/javascript/auth-mfa-verify).
|
|
1268
|
+
* - To create and verify a TOTP challenge in a single step, see [`mfa.challengeAndVerify()`](/docs/reference/javascript/auth-mfa-challengeandverify).
|
|
1269
|
+
* - To generate a QR code for the `totp` secret in Next.js, you can do the following:
|
|
1270
|
+
* ```html
|
|
1271
|
+
* <Image src={data.totp.qr_code} alt={data.totp.uri} layout="fill"></Image>
|
|
1272
|
+
* ```
|
|
1273
|
+
* - The `challenge` and `verify` steps are separated when using Phone factors as the user will need time to receive and input the code obtained from the SMS in challenge.
|
|
1274
|
+
*
|
|
1275
|
+
* @example Enroll a time-based, one-time password (TOTP) factor
|
|
1276
|
+
* ```js
|
|
1277
|
+
* const { data, error } = await supabase.auth.mfa.enroll({
|
|
1278
|
+
* factorType: 'totp',
|
|
1279
|
+
* friendlyName: 'your_friendly_name'
|
|
1280
|
+
* })
|
|
1281
|
+
*
|
|
1282
|
+
* // Use the id to create a challenge.
|
|
1283
|
+
* // The challenge can be verified by entering the code generated from the authenticator app.
|
|
1284
|
+
* // The code will be generated upon scanning the qr_code or entering the secret into the authenticator app.
|
|
1285
|
+
* const { id, type, totp: { qr_code, secret, uri }, friendly_name } = data
|
|
1286
|
+
* const challenge = await supabase.auth.mfa.challenge({ factorId: id });
|
|
1287
|
+
* ```
|
|
1288
|
+
*
|
|
1289
|
+
* @exampleResponse Enroll a time-based, one-time password (TOTP) factor
|
|
1290
|
+
* ```json
|
|
1291
|
+
* {
|
|
1292
|
+
* data: {
|
|
1293
|
+
* id: '<ID>',
|
|
1294
|
+
* type: 'totp'
|
|
1295
|
+
* totp: {
|
|
1296
|
+
* qr_code: '<QR_CODE_AS_SVG_DATA>',
|
|
1297
|
+
* secret: '<SECRET>',
|
|
1298
|
+
* uri: '<URI>',
|
|
1299
|
+
* }
|
|
1300
|
+
* friendly_name?: 'Important app'
|
|
1301
|
+
* },
|
|
1302
|
+
* error: null
|
|
1303
|
+
* }
|
|
1304
|
+
* ```
|
|
1305
|
+
*
|
|
1306
|
+
* @example Enroll a Phone Factor
|
|
1307
|
+
* ```js
|
|
1308
|
+
* const { data, error } = await supabase.auth.mfa.enroll({
|
|
1309
|
+
* factorType: 'phone',
|
|
1310
|
+
* friendlyName: 'your_friendly_name',
|
|
1311
|
+
* phone: '+12345678',
|
|
1312
|
+
* })
|
|
1313
|
+
*
|
|
1314
|
+
* // Use the id to create a challenge and send an SMS with a code to the user.
|
|
1315
|
+
* const { id, type, friendly_name, phone } = data
|
|
1316
|
+
*
|
|
1317
|
+
* const challenge = await supabase.auth.mfa.challenge({ factorId: id });
|
|
1318
|
+
* ```
|
|
1319
|
+
*
|
|
1320
|
+
* @exampleResponse Enroll a Phone Factor
|
|
1321
|
+
* ```json
|
|
1322
|
+
* {
|
|
1323
|
+
* data: {
|
|
1324
|
+
* id: '<ID>',
|
|
1325
|
+
* type: 'phone',
|
|
1326
|
+
* friendly_name?: 'Important app',
|
|
1327
|
+
* phone: '+5787123456'
|
|
1328
|
+
* },
|
|
1329
|
+
* error: null
|
|
1330
|
+
* }
|
|
1331
|
+
* ```
|
|
1261
1332
|
*/
|
|
1262
1333
|
enroll(params: MFAEnrollTOTPParams): Promise<AuthMFAEnrollTOTPResponse>
|
|
1263
1334
|
enroll(params: MFAEnrollPhoneParams): Promise<AuthMFAEnrollPhoneResponse>
|
|
@@ -1267,6 +1338,70 @@ export interface GoTrueMFAApi {
|
|
|
1267
1338
|
/**
|
|
1268
1339
|
* Prepares a challenge used to verify that a user has access to a MFA
|
|
1269
1340
|
* factor.
|
|
1341
|
+
*
|
|
1342
|
+
* @category Auth
|
|
1343
|
+
*
|
|
1344
|
+
* @remarks
|
|
1345
|
+
* - An [enrolled factor](/docs/reference/javascript/auth-mfa-enroll) is required before creating a challenge.
|
|
1346
|
+
* - To verify a challenge, see [`mfa.verify()`](/docs/reference/javascript/auth-mfa-verify).
|
|
1347
|
+
* - A phone factor sends a code to the user upon challenge. The channel defaults to `sms` unless otherwise specified.
|
|
1348
|
+
*
|
|
1349
|
+
* @example Create a challenge for a factor
|
|
1350
|
+
* ```js
|
|
1351
|
+
* const { data, error } = await supabase.auth.mfa.challenge({
|
|
1352
|
+
* factorId: '34e770dd-9ff9-416c-87fa-43b31d7ef225'
|
|
1353
|
+
* })
|
|
1354
|
+
* ```
|
|
1355
|
+
*
|
|
1356
|
+
* @exampleResponse Create a challenge for a factor
|
|
1357
|
+
* ```json
|
|
1358
|
+
* {
|
|
1359
|
+
* data: {
|
|
1360
|
+
* id: '<ID>',
|
|
1361
|
+
* type: 'totp',
|
|
1362
|
+
* expires_at: 1700000000
|
|
1363
|
+
* },
|
|
1364
|
+
* error: null
|
|
1365
|
+
* }
|
|
1366
|
+
* ```
|
|
1367
|
+
*
|
|
1368
|
+
* @example Create a challenge for a phone factor
|
|
1369
|
+
* ```js
|
|
1370
|
+
* const { data, error } = await supabase.auth.mfa.challenge({
|
|
1371
|
+
* factorId: '34e770dd-9ff9-416c-87fa-43b31d7ef225',
|
|
1372
|
+
* })
|
|
1373
|
+
* ```
|
|
1374
|
+
*
|
|
1375
|
+
* @exampleResponse Create a challenge for a phone factor
|
|
1376
|
+
* ```json
|
|
1377
|
+
* {
|
|
1378
|
+
* data: {
|
|
1379
|
+
* id: '<ID>',
|
|
1380
|
+
* type: 'phone',
|
|
1381
|
+
* expires_at: 1700000000
|
|
1382
|
+
* },
|
|
1383
|
+
* error: null
|
|
1384
|
+
* }
|
|
1385
|
+
* ```
|
|
1386
|
+
*
|
|
1387
|
+
* @example Create a challenge for a phone factor (WhatsApp)
|
|
1388
|
+
* ```js
|
|
1389
|
+
* const { data, error } = await supabase.auth.mfa.challenge({
|
|
1390
|
+
* factorId: '34e770dd-9ff9-416c-87fa-43b31d7ef225',
|
|
1391
|
+
* channel: 'whatsapp',
|
|
1392
|
+
* })
|
|
1393
|
+
* ```
|
|
1394
|
+
*
|
|
1395
|
+
* @exampleResponse Create a challenge for a phone factor (WhatsApp)
|
|
1396
|
+
* ```json
|
|
1397
|
+
* {
|
|
1398
|
+
* data: {
|
|
1399
|
+
* id: '<ID>',
|
|
1400
|
+
* expires_at: 1700000000
|
|
1401
|
+
* },
|
|
1402
|
+
* error: null
|
|
1403
|
+
* }
|
|
1404
|
+
* ```
|
|
1270
1405
|
*/
|
|
1271
1406
|
challenge(params: MFAChallengeTOTPParams): Promise<Prettify<AuthMFAChallengeTOTPResponse>>
|
|
1272
1407
|
challenge(params: MFAChallengePhoneParams): Promise<Prettify<AuthMFAChallengePhoneResponse>>
|
|
@@ -1276,6 +1411,80 @@ export interface GoTrueMFAApi {
|
|
|
1276
1411
|
/**
|
|
1277
1412
|
* Verifies a code against a challenge. The verification code is
|
|
1278
1413
|
* provided by the user by entering a code seen in their authenticator app.
|
|
1414
|
+
*
|
|
1415
|
+
* @category Auth
|
|
1416
|
+
*
|
|
1417
|
+
* @remarks
|
|
1418
|
+
* - To verify a challenge, please [create a challenge](/docs/reference/javascript/auth-mfa-challenge) first.
|
|
1419
|
+
*
|
|
1420
|
+
* @example Verify a challenge for a factor
|
|
1421
|
+
* ```js
|
|
1422
|
+
* const { data, error } = await supabase.auth.mfa.verify({
|
|
1423
|
+
* factorId: '34e770dd-9ff9-416c-87fa-43b31d7ef225',
|
|
1424
|
+
* challengeId: '4034ae6f-a8ce-4fb5-8ee5-69a5863a7c15',
|
|
1425
|
+
* code: '123456'
|
|
1426
|
+
* })
|
|
1427
|
+
* ```
|
|
1428
|
+
*
|
|
1429
|
+
* @exampleResponse Verify a challenge for a factor
|
|
1430
|
+
* ```json
|
|
1431
|
+
* {
|
|
1432
|
+
* data: {
|
|
1433
|
+
* access_token: '<ACCESS_TOKEN>',
|
|
1434
|
+
* token_type: 'Bearer',
|
|
1435
|
+
* expires_in: 3600,
|
|
1436
|
+
* refresh_token: '<REFRESH_TOKEN>',
|
|
1437
|
+
* user: {
|
|
1438
|
+
* id: '11111111-1111-1111-1111-111111111111',
|
|
1439
|
+
* aud: 'authenticated',
|
|
1440
|
+
* role: 'authenticated',
|
|
1441
|
+
* email: 'example@email.com',
|
|
1442
|
+
* email_confirmed_at: '2024-01-01T00:00:00Z',
|
|
1443
|
+
* phone: '',
|
|
1444
|
+
* confirmation_sent_at: '2024-01-01T00:00:00Z',
|
|
1445
|
+
* confirmed_at: '2024-01-01T00:00:00Z',
|
|
1446
|
+
* last_sign_in_at: '2024-01-01T00:00:00Z',
|
|
1447
|
+
* app_metadata: {
|
|
1448
|
+
* provider: 'email',
|
|
1449
|
+
* providers: [
|
|
1450
|
+
* "email",
|
|
1451
|
+
* ]
|
|
1452
|
+
* },
|
|
1453
|
+
* user_metadata: {},
|
|
1454
|
+
* identities: [
|
|
1455
|
+
* {
|
|
1456
|
+
* "identity_id": "22222222-2222-2222-2222-222222222222",
|
|
1457
|
+
* "id": "11111111-1111-1111-1111-111111111111",
|
|
1458
|
+
* "user_id": "11111111-1111-1111-1111-111111111111",
|
|
1459
|
+
* "identity_data": {
|
|
1460
|
+
* "email": "example@email.com",
|
|
1461
|
+
* "email_verified": true,
|
|
1462
|
+
* "phone_verified": false,
|
|
1463
|
+
* "sub": "11111111-1111-1111-1111-111111111111"
|
|
1464
|
+
* },
|
|
1465
|
+
* "provider": "email",
|
|
1466
|
+
* "last_sign_in_at": "2024-01-01T00:00:00Z",
|
|
1467
|
+
* "created_at": "2024-01-01T00:00:00Z",
|
|
1468
|
+
* "updated_at": "2024-01-01T00:00:00Z",
|
|
1469
|
+
* "email": "email@example.com"
|
|
1470
|
+
* },
|
|
1471
|
+
* ],
|
|
1472
|
+
* created_at: '2024-01-01T00:00:00Z',
|
|
1473
|
+
* updated_at: '2024-01-01T00:00:00Z',
|
|
1474
|
+
* is_anonymous: false,
|
|
1475
|
+
* factors: [
|
|
1476
|
+
* "id": '<ID>',
|
|
1477
|
+
* "friendly_name": 'Important Auth App',
|
|
1478
|
+
* "factor_type": 'totp',
|
|
1479
|
+
* "status": 'verified',
|
|
1480
|
+
* "created_at": "2024-01-01T00:00:00Z",
|
|
1481
|
+
* "updated_at": "2024-01-01T00:00:00Z"
|
|
1482
|
+
* ]
|
|
1483
|
+
* }
|
|
1484
|
+
* }
|
|
1485
|
+
* error: null
|
|
1486
|
+
* }
|
|
1487
|
+
* ```
|
|
1279
1488
|
*/
|
|
1280
1489
|
verify(params: MFAVerifyTOTPParams): Promise<AuthMFAVerifyResponse>
|
|
1281
1490
|
verify(params: MFAVerifyPhoneParams): Promise<AuthMFAVerifyResponse>
|
|
@@ -1285,12 +1494,106 @@ export interface GoTrueMFAApi {
|
|
|
1285
1494
|
/**
|
|
1286
1495
|
* Unenroll removes a MFA factor.
|
|
1287
1496
|
* A user has to have an `aal2` authenticator level in order to unenroll a `verified` factor.
|
|
1497
|
+
*
|
|
1498
|
+
* @category Auth
|
|
1499
|
+
*
|
|
1500
|
+
* @example Unenroll a factor
|
|
1501
|
+
* ```js
|
|
1502
|
+
* const { data, error } = await supabase.auth.mfa.unenroll({
|
|
1503
|
+
* factorId: '34e770dd-9ff9-416c-87fa-43b31d7ef225',
|
|
1504
|
+
* })
|
|
1505
|
+
* ```
|
|
1506
|
+
*
|
|
1507
|
+
* @exampleResponse Unenroll a factor
|
|
1508
|
+
* ```json
|
|
1509
|
+
* {
|
|
1510
|
+
* data: {
|
|
1511
|
+
* id: '<FACTOR_ID>'
|
|
1512
|
+
* },
|
|
1513
|
+
* error: null
|
|
1514
|
+
* }
|
|
1515
|
+
* ```
|
|
1288
1516
|
*/
|
|
1289
1517
|
unenroll(params: MFAUnenrollParams): Promise<AuthMFAUnenrollResponse>
|
|
1290
1518
|
|
|
1291
1519
|
/**
|
|
1292
1520
|
* Helper method which creates a challenge and immediately uses the given code to verify against it thereafter. The verification code is
|
|
1293
1521
|
* provided by the user by entering a code seen in their authenticator app.
|
|
1522
|
+
*
|
|
1523
|
+
* @category Auth
|
|
1524
|
+
*
|
|
1525
|
+
* @remarks
|
|
1526
|
+
* - Intended for use with only TOTP factors.
|
|
1527
|
+
* - An [enrolled factor](/docs/reference/javascript/auth-mfa-enroll) is required before invoking `challengeAndVerify()`.
|
|
1528
|
+
* - Executes [`mfa.challenge()`](/docs/reference/javascript/auth-mfa-challenge) and [`mfa.verify()`](/docs/reference/javascript/auth-mfa-verify) in a single step.
|
|
1529
|
+
*
|
|
1530
|
+
* @example Create and verify a challenge for a factor
|
|
1531
|
+
* ```js
|
|
1532
|
+
* const { data, error } = await supabase.auth.mfa.challengeAndVerify({
|
|
1533
|
+
* factorId: '34e770dd-9ff9-416c-87fa-43b31d7ef225',
|
|
1534
|
+
* code: '123456'
|
|
1535
|
+
* })
|
|
1536
|
+
* ```
|
|
1537
|
+
*
|
|
1538
|
+
* @exampleResponse Create and verify a challenge for a factor
|
|
1539
|
+
* ```json
|
|
1540
|
+
* {
|
|
1541
|
+
* data: {
|
|
1542
|
+
* access_token: '<ACCESS_TOKEN>',
|
|
1543
|
+
* token_type: 'Bearer',
|
|
1544
|
+
* expires_in: 3600,
|
|
1545
|
+
* refresh_token: '<REFRESH_TOKEN>',
|
|
1546
|
+
* user: {
|
|
1547
|
+
* id: '11111111-1111-1111-1111-111111111111',
|
|
1548
|
+
* aud: 'authenticated',
|
|
1549
|
+
* role: 'authenticated',
|
|
1550
|
+
* email: 'example@email.com',
|
|
1551
|
+
* email_confirmed_at: '2024-01-01T00:00:00Z',
|
|
1552
|
+
* phone: '',
|
|
1553
|
+
* confirmation_sent_at: '2024-01-01T00:00:00Z',
|
|
1554
|
+
* confirmed_at: '2024-01-01T00:00:00Z',
|
|
1555
|
+
* last_sign_in_at: '2024-01-01T00:00:00Z',
|
|
1556
|
+
* app_metadata: {
|
|
1557
|
+
* provider: 'email',
|
|
1558
|
+
* providers: [
|
|
1559
|
+
* "email",
|
|
1560
|
+
* ]
|
|
1561
|
+
* },
|
|
1562
|
+
* user_metadata: {},
|
|
1563
|
+
* identities: [
|
|
1564
|
+
* {
|
|
1565
|
+
* "identity_id": "22222222-2222-2222-2222-222222222222",
|
|
1566
|
+
* "id": "11111111-1111-1111-1111-111111111111",
|
|
1567
|
+
* "user_id": "11111111-1111-1111-1111-111111111111",
|
|
1568
|
+
* "identity_data": {
|
|
1569
|
+
* "email": "example@email.com",
|
|
1570
|
+
* "email_verified": true,
|
|
1571
|
+
* "phone_verified": false,
|
|
1572
|
+
* "sub": "11111111-1111-1111-1111-111111111111"
|
|
1573
|
+
* },
|
|
1574
|
+
* "provider": "email",
|
|
1575
|
+
* "last_sign_in_at": "2024-01-01T00:00:00Z",
|
|
1576
|
+
* "created_at": "2024-01-01T00:00:00Z",
|
|
1577
|
+
* "updated_at": "2024-01-01T00:00:00Z",
|
|
1578
|
+
* "email": "email@example.com"
|
|
1579
|
+
* },
|
|
1580
|
+
* ],
|
|
1581
|
+
* created_at: '2024-01-01T00:00:00Z',
|
|
1582
|
+
* updated_at: '2024-01-01T00:00:00Z',
|
|
1583
|
+
* is_anonymous: false,
|
|
1584
|
+
* factors: [
|
|
1585
|
+
* "id": '<ID>',
|
|
1586
|
+
* "friendly_name": 'Important Auth App',
|
|
1587
|
+
* "factor_type": 'totp',
|
|
1588
|
+
* "status": 'verified',
|
|
1589
|
+
* "created_at": "2024-01-01T00:00:00Z",
|
|
1590
|
+
* "updated_at": "2024-01-01T00:00:00Z"
|
|
1591
|
+
* ]
|
|
1592
|
+
* }
|
|
1593
|
+
* }
|
|
1594
|
+
* error: null
|
|
1595
|
+
* }
|
|
1596
|
+
* ```
|
|
1294
1597
|
*/
|
|
1295
1598
|
challengeAndVerify(params: MFAChallengeAndVerifyParams): Promise<AuthMFAVerifyResponse>
|
|
1296
1599
|
|
|
@@ -1301,6 +1604,8 @@ export interface GoTrueMFAApi {
|
|
|
1301
1604
|
* @see {@link GoTrueMFAApi#getAuthenticatorAssuranceLevel}
|
|
1302
1605
|
* @see {@link GoTrueClient#getUser}
|
|
1303
1606
|
*
|
|
1607
|
+
*
|
|
1608
|
+
* @category Auth
|
|
1304
1609
|
*/
|
|
1305
1610
|
listFactors(): Promise<AuthMFAListFactorsResponse>
|
|
1306
1611
|
|
|
@@ -1318,6 +1623,42 @@ export interface GoTrueMFAApi {
|
|
|
1318
1623
|
* will make a network request to validate the user and fetch their MFA factors.
|
|
1319
1624
|
*
|
|
1320
1625
|
* @param jwt Takes in an optional access token JWT. If no JWT is provided, the JWT from the current session is used.
|
|
1626
|
+
*
|
|
1627
|
+
* @category Auth
|
|
1628
|
+
*
|
|
1629
|
+
* @remarks
|
|
1630
|
+
* - Authenticator Assurance Level (AAL) is the measure of the strength of an authentication mechanism.
|
|
1631
|
+
* - In Supabase, having an AAL of `aal1` refers to having the 1st factor of authentication such as an email and password or OAuth sign-in while `aal2` refers to the 2nd factor of authentication such as a time-based, one-time-password (TOTP) or Phone factor.
|
|
1632
|
+
* - If the user has a verified factor, the `nextLevel` field will return `aal2`, else, it will return `aal1`.
|
|
1633
|
+
* - An optional `jwt` parameter can be passed to check the AAL level of a specific JWT instead of the current session.
|
|
1634
|
+
*
|
|
1635
|
+
* @example Get the AAL details of a session
|
|
1636
|
+
* ```js
|
|
1637
|
+
* const { data, error } = await supabase.auth.mfa.getAuthenticatorAssuranceLevel()
|
|
1638
|
+
* const { currentLevel, nextLevel, currentAuthenticationMethods } = data
|
|
1639
|
+
* ```
|
|
1640
|
+
*
|
|
1641
|
+
* @exampleResponse Get the AAL details of a session
|
|
1642
|
+
* ```json
|
|
1643
|
+
* {
|
|
1644
|
+
* data: {
|
|
1645
|
+
* currentLevel: 'aal1',
|
|
1646
|
+
* nextLevel: 'aal2',
|
|
1647
|
+
* currentAuthenticationMethods: [
|
|
1648
|
+
* {
|
|
1649
|
+
* method: 'password',
|
|
1650
|
+
* timestamp: 1700000000
|
|
1651
|
+
* }
|
|
1652
|
+
* ]
|
|
1653
|
+
* }
|
|
1654
|
+
* error: null
|
|
1655
|
+
* }
|
|
1656
|
+
* ```
|
|
1657
|
+
*
|
|
1658
|
+
* @example Get the AAL details for a specific JWT
|
|
1659
|
+
* ```js
|
|
1660
|
+
* const { data, error } = await supabase.auth.mfa.getAuthenticatorAssuranceLevel(jwt)
|
|
1661
|
+
* ```
|
|
1321
1662
|
*/
|
|
1322
1663
|
getAuthenticatorAssuranceLevel(
|
|
1323
1664
|
jwt?: string
|
|
@@ -1370,6 +1711,32 @@ export interface GoTrueAdminMFAApi {
|
|
|
1370
1711
|
/**
|
|
1371
1712
|
* Lists all factors associated to a user.
|
|
1372
1713
|
*
|
|
1714
|
+
*
|
|
1715
|
+
* @category Auth
|
|
1716
|
+
*
|
|
1717
|
+
* @example List all factors for a user
|
|
1718
|
+
* ```js
|
|
1719
|
+
* const { data, error } = await supabase.auth.admin.mfa.listFactors()
|
|
1720
|
+
* ```
|
|
1721
|
+
*
|
|
1722
|
+
* @exampleResponse List all factors for a user
|
|
1723
|
+
* ```json
|
|
1724
|
+
* {
|
|
1725
|
+
* data: {
|
|
1726
|
+
* factors: Factor[
|
|
1727
|
+
* {
|
|
1728
|
+
* id: '<ID>',
|
|
1729
|
+
* friendly_name: 'Auth App Factor',
|
|
1730
|
+
* factor_type: 'totp',
|
|
1731
|
+
* status: 'verified',
|
|
1732
|
+
* created_at: '2024-01-01T00:00:00Z',
|
|
1733
|
+
* updated_at: '2024-01-01T00:00:00Z'
|
|
1734
|
+
* }
|
|
1735
|
+
* ]
|
|
1736
|
+
* },
|
|
1737
|
+
* error: null
|
|
1738
|
+
* }
|
|
1739
|
+
* ```
|
|
1373
1740
|
*/
|
|
1374
1741
|
listFactors(params: AuthMFAAdminListFactorsParams): Promise<AuthMFAAdminListFactorsResponse>
|
|
1375
1742
|
|
|
@@ -1380,6 +1747,26 @@ export interface GoTrueAdminMFAApi {
|
|
|
1380
1747
|
* @see {@link GoTrueMFAApi#unenroll}
|
|
1381
1748
|
*
|
|
1382
1749
|
* @expermental
|
|
1750
|
+
*
|
|
1751
|
+
* @category Auth
|
|
1752
|
+
*
|
|
1753
|
+
* @example Delete a factor for a user
|
|
1754
|
+
* ```js
|
|
1755
|
+
* const { data, error } = await supabase.auth.admin.mfa.deleteFactor({
|
|
1756
|
+
* id: '34e770dd-9ff9-416c-87fa-43b31d7ef225',
|
|
1757
|
+
* userId: 'a89baba7-b1b7-440f-b4bb-91026967f66b',
|
|
1758
|
+
* })
|
|
1759
|
+
* ```
|
|
1760
|
+
*
|
|
1761
|
+
* @exampleResponse Delete a factor for a user
|
|
1762
|
+
* ```json
|
|
1763
|
+
* {
|
|
1764
|
+
* data: {
|
|
1765
|
+
* id: '34e770dd-9ff9-416c-87fa-43b31d7ef225'
|
|
1766
|
+
* },
|
|
1767
|
+
* error: null
|
|
1768
|
+
* }
|
|
1769
|
+
* ```
|
|
1383
1770
|
*/
|
|
1384
1771
|
deleteFactor(params: AuthMFAAdminDeleteFactorParams): Promise<AuthMFAAdminDeleteFactorResponse>
|
|
1385
1772
|
}
|
|
@@ -1730,6 +2117,8 @@ export interface GoTrueAdminOAuthApi {
|
|
|
1730
2117
|
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
1731
2118
|
*
|
|
1732
2119
|
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
2120
|
+
*
|
|
2121
|
+
* @category Auth
|
|
1733
2122
|
*/
|
|
1734
2123
|
listClients(params?: PageParams): Promise<OAuthClientListResponse>
|
|
1735
2124
|
|
|
@@ -1738,6 +2127,8 @@ export interface GoTrueAdminOAuthApi {
|
|
|
1738
2127
|
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
1739
2128
|
*
|
|
1740
2129
|
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
2130
|
+
*
|
|
2131
|
+
* @category Auth
|
|
1741
2132
|
*/
|
|
1742
2133
|
createClient(params: CreateOAuthClientParams): Promise<OAuthClientResponse>
|
|
1743
2134
|
|
|
@@ -1746,6 +2137,8 @@ export interface GoTrueAdminOAuthApi {
|
|
|
1746
2137
|
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
1747
2138
|
*
|
|
1748
2139
|
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
2140
|
+
*
|
|
2141
|
+
* @category Auth
|
|
1749
2142
|
*/
|
|
1750
2143
|
getClient(clientId: string): Promise<OAuthClientResponse>
|
|
1751
2144
|
|
|
@@ -1754,6 +2147,8 @@ export interface GoTrueAdminOAuthApi {
|
|
|
1754
2147
|
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
1755
2148
|
*
|
|
1756
2149
|
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
2150
|
+
*
|
|
2151
|
+
* @category Auth
|
|
1757
2152
|
*/
|
|
1758
2153
|
updateClient(clientId: string, params: UpdateOAuthClientParams): Promise<OAuthClientResponse>
|
|
1759
2154
|
|
|
@@ -1762,6 +2157,8 @@ export interface GoTrueAdminOAuthApi {
|
|
|
1762
2157
|
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
1763
2158
|
*
|
|
1764
2159
|
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
2160
|
+
*
|
|
2161
|
+
* @category Auth
|
|
1765
2162
|
*/
|
|
1766
2163
|
deleteClient(clientId: string): Promise<{ data: null; error: AuthError | null }>
|
|
1767
2164
|
|
|
@@ -1770,6 +2167,8 @@ export interface GoTrueAdminOAuthApi {
|
|
|
1770
2167
|
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
1771
2168
|
*
|
|
1772
2169
|
* This function should only be called on a server. Never expose your `service_role` key in the browser.
|
|
2170
|
+
*
|
|
2171
|
+
* @category Auth
|
|
1773
2172
|
*/
|
|
1774
2173
|
regenerateClientSecret(clientId: string): Promise<OAuthClientResponse>
|
|
1775
2174
|
}
|
|
@@ -2169,6 +2568,8 @@ export interface AuthOAuthServerApi {
|
|
|
2169
2568
|
*
|
|
2170
2569
|
* @param authorizationId - The authorization ID from the authorization request
|
|
2171
2570
|
* @returns Authorization details or redirect URL depending on consent status
|
|
2571
|
+
*
|
|
2572
|
+
* @category Auth
|
|
2172
2573
|
*/
|
|
2173
2574
|
getAuthorizationDetails(authorizationId: string): Promise<AuthOAuthAuthorizationDetailsResponse>
|
|
2174
2575
|
|
|
@@ -2183,6 +2584,8 @@ export interface AuthOAuthServerApi {
|
|
|
2183
2584
|
* @param options - Optional parameters
|
|
2184
2585
|
* @param options.skipBrowserRedirect - If false (default), automatically redirects the browser to the OAuth client. If true, returns the redirect_url without automatic redirect (useful for custom handling).
|
|
2185
2586
|
* @returns Redirect URL to send the user back to the OAuth client with authorization code
|
|
2587
|
+
*
|
|
2588
|
+
* @category Auth
|
|
2186
2589
|
*/
|
|
2187
2590
|
approveAuthorization(
|
|
2188
2591
|
authorizationId: string,
|
|
@@ -2200,6 +2603,8 @@ export interface AuthOAuthServerApi {
|
|
|
2200
2603
|
* @param options - Optional parameters
|
|
2201
2604
|
* @param options.skipBrowserRedirect - If false (default), automatically redirects the browser to the OAuth client. If true, returns the redirect_url without automatic redirect (useful for custom handling).
|
|
2202
2605
|
* @returns Redirect URL to send the user back to the OAuth client with error information
|
|
2606
|
+
*
|
|
2607
|
+
* @category Auth
|
|
2203
2608
|
*/
|
|
2204
2609
|
denyAuthorization(
|
|
2205
2610
|
authorizationId: string,
|
|
@@ -2211,6 +2616,8 @@ export interface AuthOAuthServerApi {
|
|
|
2211
2616
|
* Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
|
|
2212
2617
|
*
|
|
2213
2618
|
* @returns Response with array of OAuth grants with client information and granted scopes
|
|
2619
|
+
*
|
|
2620
|
+
* @category Auth
|
|
2214
2621
|
*/
|
|
2215
2622
|
listGrants(): Promise<AuthOAuthGrantsResponse>
|
|
2216
2623
|
|
|
@@ -2224,6 +2631,8 @@ export interface AuthOAuthServerApi {
|
|
|
2224
2631
|
* @param options - Revocation options
|
|
2225
2632
|
* @param options.clientId - The OAuth client identifier (UUID) to revoke access for
|
|
2226
2633
|
* @returns Empty response on successful revocation
|
|
2634
|
+
*
|
|
2635
|
+
* @category Auth
|
|
2227
2636
|
*/
|
|
2228
2637
|
revokeGrant(options: { clientId: string }): Promise<AuthOAuthRevokeGrantResponse>
|
|
2229
2638
|
}
|
package/src/lib/version.ts
CHANGED
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
// - Debugging and support (identifying which version is running)
|
|
5
5
|
// - Telemetry and logging (version reporting in errors/analytics)
|
|
6
6
|
// - Ensuring build artifacts match the published package version
|
|
7
|
-
export const version = '2.100.
|
|
7
|
+
export const version = '2.100.1'
|