@yielded/auth 0.1.0-beta.3 → 0.1.0-beta.5

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 (65) hide show
  1. package/dist/DrizzleD1.d.mts +51 -2
  2. package/dist/DrizzleLibsql.d.mts +53 -4
  3. package/dist/DrizzleMysql2.d.mts +53 -4
  4. package/dist/DrizzlePglite.d.mts +53 -4
  5. package/dist/DrizzlePostgres.d.mts +55 -6
  6. package/dist/DrizzleSqliteBun.d.mts +51 -2
  7. package/dist/DrizzleSqliteDo.d.mts +53 -4
  8. package/dist/DrizzleSqliteNode.d.mts +53 -4
  9. package/dist/DrizzleSqliteWasm.d.mts +55 -6
  10. package/dist/GitHub.d.mts +2 -1
  11. package/dist/GitHub.mjs +2 -1
  12. package/dist/OpenIdClient.d.mts +2 -1
  13. package/dist/OpenIdClient.mjs +2 -1
  14. package/dist/drizzle/oauth-connected-state.d.mts +1 -1
  15. package/dist/drizzle/oauth-registration.d.mts +1 -1
  16. package/dist/drizzle/oauth-registration.mjs +3 -2
  17. package/dist/drizzle/oauth-registration.mjs.map +1 -1
  18. package/dist/oauth/OAuthConnectedRevocations.d.mts +10 -0
  19. package/dist/oauth/OAuthRegistrationIntents.d.mts +9 -0
  20. package/dist/oauth/accountsModels.d.mts +5 -0
  21. package/dist/oauth/connected.d.mts +22 -0
  22. package/dist/oauth/connectedModels.d.mts +115 -0
  23. package/dist/oauth/definition.d.mts +111 -3
  24. package/dist/oauth/github/identity.mjs +11 -9
  25. package/dist/oauth/github/identity.mjs.map +1 -1
  26. package/dist/oauth/github/profile.d.mts +61 -0
  27. package/dist/oauth/github/profile.mjs +72 -0
  28. package/dist/oauth/github/profile.mjs.map +1 -0
  29. package/dist/oauth/github/protocol.mjs +2 -2
  30. package/dist/oauth/github/protocol.mjs.map +1 -1
  31. package/dist/oauth/openid-client/connected/protocol.mjs +3 -0
  32. package/dist/oauth/openid-client/connected/protocol.mjs.map +1 -1
  33. package/dist/oauth/openid-client/profile.d.mts +39 -0
  34. package/dist/oauth/openid-client/profile.mjs +58 -0
  35. package/dist/oauth/openid-client/profile.mjs.map +1 -0
  36. package/dist/oauth/openid-client/protocol.mjs +3 -0
  37. package/dist/oauth/openid-client/protocol.mjs.map +1 -1
  38. package/dist/oauth/registrationModels.d.mts +22 -0
  39. package/dist/oauth/registrationModels.mjs +4 -1
  40. package/dist/oauth/registrationModels.mjs.map +1 -1
  41. package/dist/oauth/registrationSecrets.mjs +1 -0
  42. package/dist/oauth/registrationSecrets.mjs.map +1 -1
  43. package/dist/oauth/signInModels.d.mts +18 -0
  44. package/dist/oauth/signInModels.mjs +11 -1
  45. package/dist/oauth/signInModels.mjs.map +1 -1
  46. package/dist/oauth/signInModule.d.mts +43 -4
  47. package/dist/oauth/signInModule.mjs +1 -1
  48. package/dist/oauth/signInModule.mjs.map +1 -1
  49. package/dist/oauth/signInSnapshot.mjs +1 -1
  50. package/dist/oauth/signInSnapshot.mjs.map +1 -1
  51. package/package.json +1 -1
  52. package/src/GitHub.ts +1 -0
  53. package/src/OpenIdClient.ts +2 -0
  54. package/src/drizzle/oauth-registration.ts +4 -0
  55. package/src/oauth/github/identity.ts +11 -7
  56. package/src/oauth/github/profile.ts +64 -0
  57. package/src/oauth/github/protocol.ts +3 -2
  58. package/src/oauth/openid-client/connected/protocol.ts +4 -0
  59. package/src/oauth/openid-client/profile.ts +68 -0
  60. package/src/oauth/openid-client/protocol.ts +4 -0
  61. package/src/oauth/registrationModels.ts +4 -0
  62. package/src/oauth/registrationSecrets.ts +1 -0
  63. package/src/oauth/signInModels.ts +18 -0
  64. package/src/oauth/signInModule.ts +4 -0
  65. package/src/oauth/signInSnapshot.ts +2 -1
@@ -1070,6 +1070,8 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1070
1070
  readonly flow: OAuthConnectedPendingFlow;
1071
1071
  readonly authorization: OAuthConnectedActionAuthorization;
1072
1072
  }, prepare: PrepareOAuthCommit<{
1073
+ readonly _tag: "Rejected";
1074
+ } | {
1073
1075
  readonly _tag: "Issued";
1074
1076
  readonly flow: {
1075
1077
  readonly context: {
@@ -1161,8 +1163,6 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1161
1163
  };
1162
1164
  readonly retentionUntilMillis: number;
1163
1165
  };
1164
- } | {
1165
- readonly _tag: "Rejected";
1166
1166
  }, A>) => import("effect/Effect").Effect<PreparedCommit<A>, OAuthUnavailable, never>;
1167
1167
  readonly preflight: (input: OAuthConnectedAccess) => import("effect/Effect").Effect<OAuthConnectedPendingFlow | undefined, OAuthUnavailable>;
1168
1168
  readonly claim: <A>(input: {
@@ -1353,6 +1353,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1353
1353
  readonly profile?: {
1354
1354
  readonly displayName?: string | undefined;
1355
1355
  readonly handle?: string | undefined;
1356
+ readonly avatarUrl?: string | undefined;
1357
+ readonly profileUrl?: string | undefined;
1358
+ readonly email?: string | undefined;
1359
+ readonly emailVerified?: boolean | undefined;
1360
+ readonly providerData?: {
1361
+ readonly [x: string]: import("effect/Schema").Json;
1362
+ } | undefined;
1356
1363
  } | undefined;
1357
1364
  };
1358
1365
  };
@@ -1383,6 +1390,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1383
1390
  readonly profile?: {
1384
1391
  readonly displayName?: string | undefined;
1385
1392
  readonly handle?: string | undefined;
1393
+ readonly avatarUrl?: string | undefined;
1394
+ readonly profileUrl?: string | undefined;
1395
+ readonly email?: string | undefined;
1396
+ readonly emailVerified?: boolean | undefined;
1397
+ readonly providerData?: {
1398
+ readonly [x: string]: import("effect/Schema").Json;
1399
+ } | undefined;
1386
1400
  } | undefined;
1387
1401
  readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1388
1402
  }[];
@@ -1449,6 +1463,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1449
1463
  readonly profile?: {
1450
1464
  readonly displayName?: string | undefined;
1451
1465
  readonly handle?: string | undefined;
1466
+ readonly avatarUrl?: string | undefined;
1467
+ readonly profileUrl?: string | undefined;
1468
+ readonly email?: string | undefined;
1469
+ readonly emailVerified?: boolean | undefined;
1470
+ readonly providerData?: {
1471
+ readonly [x: string]: import("effect/Schema").Json;
1472
+ } | undefined;
1452
1473
  } | undefined;
1453
1474
  };
1454
1475
  };
@@ -1554,6 +1575,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1554
1575
  readonly profile?: {
1555
1576
  readonly displayName?: string | undefined;
1556
1577
  readonly handle?: string | undefined;
1578
+ readonly avatarUrl?: string | undefined;
1579
+ readonly profileUrl?: string | undefined;
1580
+ readonly email?: string | undefined;
1581
+ readonly emailVerified?: boolean | undefined;
1582
+ readonly providerData?: {
1583
+ readonly [x: string]: import("effect/Schema").Json;
1584
+ } | undefined;
1557
1585
  } | undefined;
1558
1586
  };
1559
1587
  };
@@ -1631,6 +1659,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1631
1659
  readonly profile?: {
1632
1660
  readonly displayName?: string | undefined;
1633
1661
  readonly handle?: string | undefined;
1662
+ readonly avatarUrl?: string | undefined;
1663
+ readonly profileUrl?: string | undefined;
1664
+ readonly email?: string | undefined;
1665
+ readonly emailVerified?: boolean | undefined;
1666
+ readonly providerData?: {
1667
+ readonly [x: string]: import("effect/Schema").Json;
1668
+ } | undefined;
1634
1669
  } | undefined;
1635
1670
  };
1636
1671
  };
@@ -1706,6 +1741,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1706
1741
  readonly profile?: {
1707
1742
  readonly displayName?: string | undefined;
1708
1743
  readonly handle?: string | undefined;
1744
+ readonly avatarUrl?: string | undefined;
1745
+ readonly profileUrl?: string | undefined;
1746
+ readonly email?: string | undefined;
1747
+ readonly emailVerified?: boolean | undefined;
1748
+ readonly providerData?: {
1749
+ readonly [x: string]: import("effect/Schema").Json;
1750
+ } | undefined;
1709
1751
  } | undefined;
1710
1752
  };
1711
1753
  };
@@ -1817,6 +1859,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1817
1859
  readonly profile?: {
1818
1860
  readonly displayName?: string | undefined;
1819
1861
  readonly handle?: string | undefined;
1862
+ readonly avatarUrl?: string | undefined;
1863
+ readonly profileUrl?: string | undefined;
1864
+ readonly email?: string | undefined;
1865
+ readonly emailVerified?: boolean | undefined;
1866
+ readonly providerData?: {
1867
+ readonly [x: string]: import("effect/Schema").Json;
1868
+ } | undefined;
1820
1869
  } | undefined;
1821
1870
  };
1822
1871
  };
@@ -759,6 +759,8 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
759
759
  readonly _tag: "Ambiguous";
760
760
  } | {
761
761
  readonly _tag: "Cancelled";
762
+ } | {
763
+ readonly _tag: "Conflict";
762
764
  } | {
763
765
  readonly _tag: "Linked";
764
766
  readonly credential: {
@@ -780,8 +782,6 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
780
782
  };
781
783
  };
782
784
  readonly changed: boolean;
783
- } | {
784
- readonly _tag: "Conflict";
785
785
  }, A>) => Effect.Effect<PreparedCommit<A>, OAuthUnavailable>;
786
786
  readonly inspectUnlink: (input: {
787
787
  readonly moduleId: string & import("effect/Brand").Brand<"effect-auth/OAuthModuleId">;
@@ -835,8 +835,6 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
835
835
  readonly retentionUntilMillis: number;
836
836
  }, prepare: PrepareOAuthCommit<{
837
837
  readonly _tag: "Rejected";
838
- } | {
839
- readonly _tag: "LastSignInMethod";
840
838
  } | {
841
839
  readonly _tag: "Conflict";
842
840
  } | {
@@ -852,6 +850,8 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
852
850
  };
853
851
  };
854
852
  readonly replayed: boolean;
853
+ } | {
854
+ readonly _tag: "LastSignInMethod";
855
855
  }, A>) => Effect.Effect<PreparedCommit<A>, OAuthUnavailable>;
856
856
  readonly cleanup: <A>(input: OAuthCleanupInput, prepare: PrepareOAuthCommit<{
857
857
  readonly terminalized: number;
@@ -1409,6 +1409,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1409
1409
  readonly profile?: {
1410
1410
  readonly displayName?: string | undefined;
1411
1411
  readonly handle?: string | undefined;
1412
+ readonly avatarUrl?: string | undefined;
1413
+ readonly profileUrl?: string | undefined;
1414
+ readonly email?: string | undefined;
1415
+ readonly emailVerified?: boolean | undefined;
1416
+ readonly providerData?: {
1417
+ readonly [x: string]: import("effect/Schema").Json;
1418
+ } | undefined;
1412
1419
  } | undefined;
1413
1420
  };
1414
1421
  };
@@ -1439,6 +1446,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1439
1446
  readonly profile?: {
1440
1447
  readonly displayName?: string | undefined;
1441
1448
  readonly handle?: string | undefined;
1449
+ readonly avatarUrl?: string | undefined;
1450
+ readonly profileUrl?: string | undefined;
1451
+ readonly email?: string | undefined;
1452
+ readonly emailVerified?: boolean | undefined;
1453
+ readonly providerData?: {
1454
+ readonly [x: string]: import("effect/Schema").Json;
1455
+ } | undefined;
1442
1456
  } | undefined;
1443
1457
  readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1444
1458
  }[];
@@ -1505,6 +1519,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1505
1519
  readonly profile?: {
1506
1520
  readonly displayName?: string | undefined;
1507
1521
  readonly handle?: string | undefined;
1522
+ readonly avatarUrl?: string | undefined;
1523
+ readonly profileUrl?: string | undefined;
1524
+ readonly email?: string | undefined;
1525
+ readonly emailVerified?: boolean | undefined;
1526
+ readonly providerData?: {
1527
+ readonly [x: string]: import("effect/Schema").Json;
1528
+ } | undefined;
1508
1529
  } | undefined;
1509
1530
  };
1510
1531
  };
@@ -1610,6 +1631,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1610
1631
  readonly profile?: {
1611
1632
  readonly displayName?: string | undefined;
1612
1633
  readonly handle?: string | undefined;
1634
+ readonly avatarUrl?: string | undefined;
1635
+ readonly profileUrl?: string | undefined;
1636
+ readonly email?: string | undefined;
1637
+ readonly emailVerified?: boolean | undefined;
1638
+ readonly providerData?: {
1639
+ readonly [x: string]: import("effect/Schema").Json;
1640
+ } | undefined;
1613
1641
  } | undefined;
1614
1642
  };
1615
1643
  };
@@ -1687,6 +1715,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1687
1715
  readonly profile?: {
1688
1716
  readonly displayName?: string | undefined;
1689
1717
  readonly handle?: string | undefined;
1718
+ readonly avatarUrl?: string | undefined;
1719
+ readonly profileUrl?: string | undefined;
1720
+ readonly email?: string | undefined;
1721
+ readonly emailVerified?: boolean | undefined;
1722
+ readonly providerData?: {
1723
+ readonly [x: string]: import("effect/Schema").Json;
1724
+ } | undefined;
1690
1725
  } | undefined;
1691
1726
  };
1692
1727
  };
@@ -1762,6 +1797,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1762
1797
  readonly profile?: {
1763
1798
  readonly displayName?: string | undefined;
1764
1799
  readonly handle?: string | undefined;
1800
+ readonly avatarUrl?: string | undefined;
1801
+ readonly profileUrl?: string | undefined;
1802
+ readonly email?: string | undefined;
1803
+ readonly emailVerified?: boolean | undefined;
1804
+ readonly providerData?: {
1805
+ readonly [x: string]: import("effect/Schema").Json;
1806
+ } | undefined;
1765
1807
  } | undefined;
1766
1808
  };
1767
1809
  };
@@ -1873,6 +1915,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1873
1915
  readonly profile?: {
1874
1916
  readonly displayName?: string | undefined;
1875
1917
  readonly handle?: string | undefined;
1918
+ readonly avatarUrl?: string | undefined;
1919
+ readonly profileUrl?: string | undefined;
1920
+ readonly email?: string | undefined;
1921
+ readonly emailVerified?: boolean | undefined;
1922
+ readonly providerData?: {
1923
+ readonly [x: string]: import("effect/Schema").Json;
1924
+ } | undefined;
1876
1925
  } | undefined;
1877
1926
  };
1878
1927
  };
@@ -699,12 +699,12 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
699
699
  readonly nowMillis: number;
700
700
  }, prepare: PrepareOAuthCommit<{
701
701
  readonly _tag: "Rejected";
702
- } | {
703
- readonly _tag: "Ambiguous";
704
702
  } | {
705
703
  readonly _tag: "Conflict";
706
704
  } | {
707
705
  readonly _tag: "Cancelled";
706
+ } | {
707
+ readonly _tag: "Ambiguous";
708
708
  } | {
709
709
  readonly _tag: "Linked";
710
710
  readonly credential: {
@@ -1296,12 +1296,12 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1296
1296
  readonly nowMillis: number;
1297
1297
  }, prepare: PrepareOAuthCommit<{
1298
1298
  readonly _tag: "Rejected";
1299
- } | {
1300
- readonly _tag: "Ambiguous";
1301
1299
  } | {
1302
1300
  readonly _tag: "Conflict";
1303
1301
  } | {
1304
1302
  readonly _tag: "Cancelled";
1303
+ } | {
1304
+ readonly _tag: "Ambiguous";
1305
1305
  } | {
1306
1306
  readonly _tag: "Connected";
1307
1307
  readonly grant: {
@@ -1353,6 +1353,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1353
1353
  readonly profile?: {
1354
1354
  readonly displayName?: string | undefined;
1355
1355
  readonly handle?: string | undefined;
1356
+ readonly avatarUrl?: string | undefined;
1357
+ readonly profileUrl?: string | undefined;
1358
+ readonly email?: string | undefined;
1359
+ readonly emailVerified?: boolean | undefined;
1360
+ readonly providerData?: {
1361
+ readonly [x: string]: import("effect/Schema").Json;
1362
+ } | undefined;
1356
1363
  } | undefined;
1357
1364
  };
1358
1365
  };
@@ -1383,6 +1390,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1383
1390
  readonly profile?: {
1384
1391
  readonly displayName?: string | undefined;
1385
1392
  readonly handle?: string | undefined;
1393
+ readonly avatarUrl?: string | undefined;
1394
+ readonly profileUrl?: string | undefined;
1395
+ readonly email?: string | undefined;
1396
+ readonly emailVerified?: boolean | undefined;
1397
+ readonly providerData?: {
1398
+ readonly [x: string]: import("effect/Schema").Json;
1399
+ } | undefined;
1386
1400
  } | undefined;
1387
1401
  readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1388
1402
  }[];
@@ -1449,6 +1463,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1449
1463
  readonly profile?: {
1450
1464
  readonly displayName?: string | undefined;
1451
1465
  readonly handle?: string | undefined;
1466
+ readonly avatarUrl?: string | undefined;
1467
+ readonly profileUrl?: string | undefined;
1468
+ readonly email?: string | undefined;
1469
+ readonly emailVerified?: boolean | undefined;
1470
+ readonly providerData?: {
1471
+ readonly [x: string]: import("effect/Schema").Json;
1472
+ } | undefined;
1452
1473
  } | undefined;
1453
1474
  };
1454
1475
  };
@@ -1554,6 +1575,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1554
1575
  readonly profile?: {
1555
1576
  readonly displayName?: string | undefined;
1556
1577
  readonly handle?: string | undefined;
1578
+ readonly avatarUrl?: string | undefined;
1579
+ readonly profileUrl?: string | undefined;
1580
+ readonly email?: string | undefined;
1581
+ readonly emailVerified?: boolean | undefined;
1582
+ readonly providerData?: {
1583
+ readonly [x: string]: import("effect/Schema").Json;
1584
+ } | undefined;
1557
1585
  } | undefined;
1558
1586
  };
1559
1587
  };
@@ -1631,6 +1659,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1631
1659
  readonly profile?: {
1632
1660
  readonly displayName?: string | undefined;
1633
1661
  readonly handle?: string | undefined;
1662
+ readonly avatarUrl?: string | undefined;
1663
+ readonly profileUrl?: string | undefined;
1664
+ readonly email?: string | undefined;
1665
+ readonly emailVerified?: boolean | undefined;
1666
+ readonly providerData?: {
1667
+ readonly [x: string]: import("effect/Schema").Json;
1668
+ } | undefined;
1634
1669
  } | undefined;
1635
1670
  };
1636
1671
  };
@@ -1706,6 +1741,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1706
1741
  readonly profile?: {
1707
1742
  readonly displayName?: string | undefined;
1708
1743
  readonly handle?: string | undefined;
1744
+ readonly avatarUrl?: string | undefined;
1745
+ readonly profileUrl?: string | undefined;
1746
+ readonly email?: string | undefined;
1747
+ readonly emailVerified?: boolean | undefined;
1748
+ readonly providerData?: {
1749
+ readonly [x: string]: import("effect/Schema").Json;
1750
+ } | undefined;
1709
1751
  } | undefined;
1710
1752
  };
1711
1753
  };
@@ -1817,6 +1859,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1817
1859
  readonly profile?: {
1818
1860
  readonly displayName?: string | undefined;
1819
1861
  readonly handle?: string | undefined;
1862
+ readonly avatarUrl?: string | undefined;
1863
+ readonly profileUrl?: string | undefined;
1864
+ readonly email?: string | undefined;
1865
+ readonly emailVerified?: boolean | undefined;
1866
+ readonly providerData?: {
1867
+ readonly [x: string]: import("effect/Schema").Json;
1868
+ } | undefined;
1820
1869
  } | undefined;
1821
1870
  };
1822
1871
  };
@@ -699,12 +699,12 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
699
699
  readonly nowMillis: number;
700
700
  }, prepare: PrepareOAuthCommit<{
701
701
  readonly _tag: "Rejected";
702
+ } | {
703
+ readonly _tag: "Ambiguous";
702
704
  } | {
703
705
  readonly _tag: "Conflict";
704
706
  } | {
705
707
  readonly _tag: "Cancelled";
706
- } | {
707
- readonly _tag: "Ambiguous";
708
708
  } | {
709
709
  readonly _tag: "Linked";
710
710
  readonly credential: {
@@ -781,6 +781,8 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
781
781
  readonly _tag: "Rejected";
782
782
  } | {
783
783
  readonly _tag: "Conflict";
784
+ } | {
785
+ readonly _tag: "LastSignInMethod";
784
786
  } | {
785
787
  readonly _tag: "Unlinked";
786
788
  readonly result: {
@@ -794,8 +796,6 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
794
796
  };
795
797
  };
796
798
  readonly replayed: boolean;
797
- } | {
798
- readonly _tag: "LastSignInMethod";
799
799
  }, A>) => import("effect/Effect").Effect<PreparedCommit<A>, OAuthUnavailable>;
800
800
  readonly cleanup: <A>(input: OAuthCleanupInput, prepare: PrepareOAuthCommit<{
801
801
  readonly terminalized: number;
@@ -1296,12 +1296,12 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1296
1296
  readonly nowMillis: number;
1297
1297
  }, prepare: PrepareOAuthCommit<{
1298
1298
  readonly _tag: "Rejected";
1299
+ } | {
1300
+ readonly _tag: "Ambiguous";
1299
1301
  } | {
1300
1302
  readonly _tag: "Conflict";
1301
1303
  } | {
1302
1304
  readonly _tag: "Cancelled";
1303
- } | {
1304
- readonly _tag: "Ambiguous";
1305
1305
  } | {
1306
1306
  readonly _tag: "Connected";
1307
1307
  readonly grant: {
@@ -1353,6 +1353,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1353
1353
  readonly profile?: {
1354
1354
  readonly displayName?: string | undefined;
1355
1355
  readonly handle?: string | undefined;
1356
+ readonly avatarUrl?: string | undefined;
1357
+ readonly profileUrl?: string | undefined;
1358
+ readonly email?: string | undefined;
1359
+ readonly emailVerified?: boolean | undefined;
1360
+ readonly providerData?: {
1361
+ readonly [x: string]: import("effect/Schema").Json;
1362
+ } | undefined;
1356
1363
  } | undefined;
1357
1364
  };
1358
1365
  };
@@ -1383,6 +1390,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1383
1390
  readonly profile?: {
1384
1391
  readonly displayName?: string | undefined;
1385
1392
  readonly handle?: string | undefined;
1393
+ readonly avatarUrl?: string | undefined;
1394
+ readonly profileUrl?: string | undefined;
1395
+ readonly email?: string | undefined;
1396
+ readonly emailVerified?: boolean | undefined;
1397
+ readonly providerData?: {
1398
+ readonly [x: string]: import("effect/Schema").Json;
1399
+ } | undefined;
1386
1400
  } | undefined;
1387
1401
  readonly remoteRevocation: "Confirmed" | "Pending" | "Unknown" | "Unsupported";
1388
1402
  }[];
@@ -1449,6 +1463,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1449
1463
  readonly profile?: {
1450
1464
  readonly displayName?: string | undefined;
1451
1465
  readonly handle?: string | undefined;
1466
+ readonly avatarUrl?: string | undefined;
1467
+ readonly profileUrl?: string | undefined;
1468
+ readonly email?: string | undefined;
1469
+ readonly emailVerified?: boolean | undefined;
1470
+ readonly providerData?: {
1471
+ readonly [x: string]: import("effect/Schema").Json;
1472
+ } | undefined;
1452
1473
  } | undefined;
1453
1474
  };
1454
1475
  };
@@ -1554,6 +1575,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1554
1575
  readonly profile?: {
1555
1576
  readonly displayName?: string | undefined;
1556
1577
  readonly handle?: string | undefined;
1578
+ readonly avatarUrl?: string | undefined;
1579
+ readonly profileUrl?: string | undefined;
1580
+ readonly email?: string | undefined;
1581
+ readonly emailVerified?: boolean | undefined;
1582
+ readonly providerData?: {
1583
+ readonly [x: string]: import("effect/Schema").Json;
1584
+ } | undefined;
1557
1585
  } | undefined;
1558
1586
  };
1559
1587
  };
@@ -1631,6 +1659,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1631
1659
  readonly profile?: {
1632
1660
  readonly displayName?: string | undefined;
1633
1661
  readonly handle?: string | undefined;
1662
+ readonly avatarUrl?: string | undefined;
1663
+ readonly profileUrl?: string | undefined;
1664
+ readonly email?: string | undefined;
1665
+ readonly emailVerified?: boolean | undefined;
1666
+ readonly providerData?: {
1667
+ readonly [x: string]: import("effect/Schema").Json;
1668
+ } | undefined;
1634
1669
  } | undefined;
1635
1670
  };
1636
1671
  };
@@ -1706,6 +1741,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1706
1741
  readonly profile?: {
1707
1742
  readonly displayName?: string | undefined;
1708
1743
  readonly handle?: string | undefined;
1744
+ readonly avatarUrl?: string | undefined;
1745
+ readonly profileUrl?: string | undefined;
1746
+ readonly email?: string | undefined;
1747
+ readonly emailVerified?: boolean | undefined;
1748
+ readonly providerData?: {
1749
+ readonly [x: string]: import("effect/Schema").Json;
1750
+ } | undefined;
1709
1751
  } | undefined;
1710
1752
  };
1711
1753
  };
@@ -1817,6 +1859,13 @@ declare const makeOAuthAccountsServices: <S extends AnySQLiteTable<{
1817
1859
  readonly profile?: {
1818
1860
  readonly displayName?: string | undefined;
1819
1861
  readonly handle?: string | undefined;
1862
+ readonly avatarUrl?: string | undefined;
1863
+ readonly profileUrl?: string | undefined;
1864
+ readonly email?: string | undefined;
1865
+ readonly emailVerified?: boolean | undefined;
1866
+ readonly providerData?: {
1867
+ readonly [x: string]: import("effect/Schema").Json;
1868
+ } | undefined;
1820
1869
  } | undefined;
1821
1870
  };
1822
1871
  };
package/dist/GitHub.d.mts CHANGED
@@ -2,4 +2,5 @@ import { OpenIdClientConfigurationError } from "./oauth/openid-client/models.mjs
2
2
  import { GitHubOAuthAppConnectedProtocolOptions, GitHubOAuthAppGeneration, GitHubOAuthAppProtocolOptions } from "./oauth/github/models.mjs";
3
3
  import { gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProvider, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol } from "./oauth/github/protocol.mjs";
4
4
  import { gitHubOAuthAppProviderKey } from "./oauth/github/identity.mjs";
5
- export { type GitHubOAuthAppConnectedProtocolOptions, type GitHubOAuthAppGeneration, type GitHubOAuthAppProtocolOptions, OpenIdClientConfigurationError, gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProvider, gitHubOAuthAppProviderKey, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol };
5
+ import { GitHubUserProfile } from "./oauth/github/profile.mjs";
6
+ export { type GitHubOAuthAppConnectedProtocolOptions, type GitHubOAuthAppGeneration, type GitHubOAuthAppProtocolOptions, GitHubUserProfile, OpenIdClientConfigurationError, gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProvider, gitHubOAuthAppProviderKey, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol };
package/dist/GitHub.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import { OpenIdClientConfigurationError } from "./oauth/openid-client/models.mjs";
2
+ import { GitHubUserProfile } from "./oauth/github/profile.mjs";
2
3
  import { gitHubOAuthAppProviderKey } from "./oauth/github/identity.mjs";
3
4
  import { gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProvider, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol } from "./oauth/github/protocol.mjs";
4
- export { OpenIdClientConfigurationError, gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProvider, gitHubOAuthAppProviderKey, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol };
5
+ export { GitHubUserProfile, OpenIdClientConfigurationError, gitHubOAuthAppConnectedProtocolLayer, gitHubOAuthAppProtocolLayer, gitHubOAuthAppProvider, gitHubOAuthAppProviderKey, makeGitHubOAuthAppConnectedProtocol, makeGitHubOAuthAppProtocol };
@@ -1,3 +1,4 @@
1
1
  import { OpenIdClientAuthentication, OpenIdClientConfigurationError, OpenIdClientOAuthProtocolOptions, OpenIdClientOAuthProvider, OpenIdClientOidcProvider, PlainOAuthIdentity } from "./oauth/openid-client/models.mjs";
2
2
  import { makeOpenIdClientOAuthProtocol, openIdClientOAuthProtocolLayer } from "./oauth/openid-client/protocol.mjs";
3
- export { type OpenIdClientAuthentication, OpenIdClientConfigurationError, type OpenIdClientOAuthProtocolOptions, type OpenIdClientOAuthProvider, type OpenIdClientOidcProvider, type PlainOAuthIdentity, makeOpenIdClientOAuthProtocol, openIdClientOAuthProtocolLayer };
3
+ import { OidcUserProfile } from "./oauth/openid-client/profile.mjs";
4
+ export { OidcUserProfile, type OpenIdClientAuthentication, OpenIdClientConfigurationError, type OpenIdClientOAuthProtocolOptions, type OpenIdClientOAuthProvider, type OpenIdClientOidcProvider, type PlainOAuthIdentity, makeOpenIdClientOAuthProtocol, openIdClientOAuthProtocolLayer };
@@ -1,3 +1,4 @@
1
1
  import { OpenIdClientConfigurationError } from "./oauth/openid-client/models.mjs";
2
+ import { OidcUserProfile } from "./oauth/openid-client/profile.mjs";
2
3
  import { makeOpenIdClientOAuthProtocol, openIdClientOAuthProtocolLayer } from "./oauth/openid-client/protocol.mjs";
3
- export { OpenIdClientConfigurationError, makeOpenIdClientOAuthProtocol, openIdClientOAuthProtocolLayer };
4
+ export { OidcUserProfile, OpenIdClientConfigurationError, makeOpenIdClientOAuthProtocol, openIdClientOAuthProtocolLayer };
@@ -6,7 +6,7 @@ import "../OAuth.mjs";
6
6
  import "./transaction-owner.mjs";
7
7
  import "./oauth-owner.mjs";
8
8
  import "./oauth-flow.mjs";
9
- import { DateTime, Effect } from "effect";
9
+ import { DateTime, Effect, Schema } from "effect";
10
10
  import { SQL, Table } from "drizzle-orm";
11
11
  //#region src/drizzle/oauth-connected-state.d.ts
12
12
  type Mapping = OAuthConnectedMapping<any, any, any, any, any, any, any, any, any, any, any, any>;
@@ -5,4 +5,4 @@ import "./oauth-model.mjs";
5
5
  import "../OAuth.mjs";
6
6
  import "./transaction-owner.mjs";
7
7
  import "./oauth-owner.mjs";
8
- import { Effect } from "effect";
8
+ import { Effect, Schema } from "effect";
@@ -1,4 +1,4 @@
1
- import { OAuthCredentialSnapshot, OAuthSignInTransactionContext } from "../oauth/signInModels.mjs";
1
+ import { OAuthCredentialSnapshot, OAuthDisplayProfile, OAuthSignInTransactionContext } from "../oauth/signInModels.mjs";
2
2
  import { OAuthRegistrationAccess, OAuthRegistrationDecision, OAuthRegistrationFingerprint, OAuthRegistrationInspection, OAuthRegistrationIntent } from "../oauth/registrationModels.mjs";
3
3
  import { snapshotOAuthSync } from "../oauth/signInSnapshot.mjs";
4
4
  import { invariant, oauthIdentityKey, sameIdentity, storage } from "./oauth-state.mjs";
@@ -11,6 +11,7 @@ import { eq, sql } from "drizzle-orm";
11
11
  const intentStorage = storage(OAuthRegistrationIntent);
12
12
  const decisionStorage = storage(OAuthRegistrationDecision);
13
13
  const contextStorage = storage(OAuthSignInTransactionContext);
14
+ const profileStorage = storage(Schema.NullOr(OAuthDisplayProfile));
14
15
  const reservationStorage = storage(Schema.Struct({
15
16
  moduleId: Schema.String,
16
17
  reference: Schema.String,
@@ -107,7 +108,7 @@ const settleRegistrationIntent = (mapping, input) => Effect.flatMap(CurrentOAuth
107
108
  if (!found.owned && tuple?.row[mapping.ownership.tuple.state] === "Unowned" && input.intent !== void 0) {
108
109
  const intent = snapshotOAuthSync(OAuthRegistrationIntent, input.intent);
109
110
  const c = intent.context;
110
- invariant(sameIdentity(intent.identity, identity) && intent.claimId === input.claim.claimId && intent.claimedAtMillis === input.claim.claimedAtMillis && contextStorage.encode(c) === contextStorage.encode(context));
111
+ invariant(sameIdentity(intent.identity, identity) && profileStorage.encode(intent.profile ?? null) === profileStorage.encode(input.identity.profile ?? null) && intent.claimId === input.claim.claimId && intent.claimedAtMillis === input.claim.claimedAtMillis && contextStorage.encode(c) === contextStorage.encode(context));
111
112
  if (intent.issuedAtMillis >= intent.claimedAtMillis && intent.verifiedAtMillis <= intent.issuedAtMillis && intent.issuedAtMillis <= exact.now && exact.now < intent.expiresAtMillis && intent.expiresAtMillis <= c.requestBindingExpiresAtMillis && intent.retentionUntilMillis >= intent.expiresAtMillis && (yield* owner.check(mapping.eligibility.condition({ intent })))) {
112
113
  const i = mapping.intent, encode = mapping.signIn.clock.encodeInstant;
113
114
  const key = {