@eventmodelers/node-kit 0.0.2

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 (546) hide show
  1. package/README.md +66 -0
  2. package/package.json +36 -0
  3. package/src/cli.js +176 -0
  4. package/templates/.claude/skills/connect/SKILL.md +169 -0
  5. package/templates/.claude/skills/load-slice/SKILL.md +86 -0
  6. package/templates/realtime-agent/node_modules/.package-lock.json +107 -0
  7. package/templates/realtime-agent/node_modules/@supabase/auth-js/LICENSE +21 -0
  8. package/templates/realtime-agent/node_modules/@supabase/auth-js/README.md +190 -0
  9. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts +4 -0
  10. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.d.ts.map +1 -0
  11. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js +7 -0
  12. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthAdminApi.js.map +1 -0
  13. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts +4 -0
  14. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.d.ts.map +1 -0
  15. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.js +7 -0
  16. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/AuthClient.js.map +1 -0
  17. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts +716 -0
  18. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.d.ts.map +1 -0
  19. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js +1108 -0
  20. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueAdminApi.js.map +1 -0
  21. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts +2473 -0
  22. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.d.ts.map +1 -0
  23. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js +5217 -0
  24. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/GoTrueClient.js.map +1 -0
  25. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.d.ts +9 -0
  26. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.d.ts.map +1 -0
  27. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.js +20 -0
  28. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/index.js.map +1 -0
  29. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts +76 -0
  30. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.d.ts.map +1 -0
  31. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.js +269 -0
  32. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/base64url.js.map +1 -0
  33. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts +26 -0
  34. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.d.ts.map +1 -0
  35. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.js +31 -0
  36. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/constants.js.map +1 -0
  37. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts +7 -0
  38. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.d.ts.map +1 -0
  39. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js +3 -0
  40. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/error-codes.js.map +1 -0
  41. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts +258 -0
  42. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.d.ts.map +1 -0
  43. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.js +290 -0
  44. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/errors.js.map +1 -0
  45. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts +54 -0
  46. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.d.ts.map +1 -0
  47. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.js +200 -0
  48. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/fetch.js.map +1 -0
  49. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts +94 -0
  50. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.d.ts.map +1 -0
  51. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.js +406 -0
  52. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/helpers.js.map +1 -0
  53. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts +9 -0
  54. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.d.ts.map +1 -0
  55. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js +21 -0
  56. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/local-storage.js.map +1 -0
  57. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts +107 -0
  58. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.d.ts.map +1 -0
  59. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.js +349 -0
  60. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/locks.js.map +1 -0
  61. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts +5 -0
  62. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.d.ts.map +1 -0
  63. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js +29 -0
  64. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/polyfills.js.map +1 -0
  65. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts +2498 -0
  66. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.d.ts.map +1 -0
  67. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.js +23 -0
  68. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/types.js.map +1 -0
  69. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts +2 -0
  70. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.d.ts.map +1 -0
  71. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.js +11 -0
  72. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/version.js.map +1 -0
  73. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts +96 -0
  74. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.d.ts.map +1 -0
  75. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js +66 -0
  76. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/ethereum.js.map +1 -0
  77. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts +160 -0
  78. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.d.ts.map +1 -0
  79. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.js +4 -0
  80. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/web3/solana.js.map +1 -0
  81. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts +284 -0
  82. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.d.ts.map +1 -0
  83. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts +583 -0
  84. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.d.ts.map +1 -0
  85. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js +4 -0
  86. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.dom.js.map +1 -0
  87. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts +85 -0
  88. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.d.ts.map +1 -0
  89. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js +272 -0
  90. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.errors.js.map +1 -0
  91. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js +707 -0
  92. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/main/lib/webauthn.js.map +1 -0
  93. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts +4 -0
  94. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.d.ts.map +1 -0
  95. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js +4 -0
  96. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthAdminApi.js.map +1 -0
  97. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts +4 -0
  98. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.d.ts.map +1 -0
  99. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.js +4 -0
  100. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/AuthClient.js.map +1 -0
  101. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts +716 -0
  102. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.d.ts.map +1 -0
  103. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js +1105 -0
  104. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueAdminApi.js.map +1 -0
  105. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts +2473 -0
  106. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.d.ts.map +1 -0
  107. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js +5214 -0
  108. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/GoTrueClient.js.map +1 -0
  109. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.d.ts +9 -0
  110. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.d.ts.map +1 -0
  111. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.js +9 -0
  112. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/index.js.map +1 -0
  113. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts +76 -0
  114. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.d.ts.map +1 -0
  115. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.js +257 -0
  116. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/base64url.js.map +1 -0
  117. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts +26 -0
  118. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.d.ts.map +1 -0
  119. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.js +28 -0
  120. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/constants.js.map +1 -0
  121. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts +7 -0
  122. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.d.ts.map +1 -0
  123. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js +2 -0
  124. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/error-codes.js.map +1 -0
  125. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts +258 -0
  126. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.d.ts.map +1 -0
  127. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.js +267 -0
  128. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/errors.js.map +1 -0
  129. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts +54 -0
  130. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.d.ts.map +1 -0
  131. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.js +190 -0
  132. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/fetch.js.map +1 -0
  133. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts +94 -0
  134. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.d.ts.map +1 -0
  135. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.js +378 -0
  136. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/helpers.js.map +1 -0
  137. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.d.ts +9 -0
  138. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.d.ts.map +1 -0
  139. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js +18 -0
  140. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/local-storage.js.map +1 -0
  141. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.d.ts +107 -0
  142. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.d.ts.map +1 -0
  143. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.js +341 -0
  144. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/locks.js.map +1 -0
  145. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.d.ts +5 -0
  146. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.d.ts.map +1 -0
  147. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.js +26 -0
  148. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/polyfills.js.map +1 -0
  149. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.d.ts +2498 -0
  150. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.d.ts.map +1 -0
  151. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.js +20 -0
  152. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/types.js.map +1 -0
  153. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.d.ts +2 -0
  154. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.d.ts.map +1 -0
  155. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.js +8 -0
  156. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/version.js.map +1 -0
  157. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.d.ts +96 -0
  158. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.d.ts.map +1 -0
  159. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.js +60 -0
  160. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/ethereum.js.map +1 -0
  161. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.d.ts +160 -0
  162. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.d.ts.map +1 -0
  163. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.js +3 -0
  164. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/web3/solana.js.map +1 -0
  165. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.d.ts +284 -0
  166. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.d.ts.map +1 -0
  167. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.d.ts +583 -0
  168. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.d.ts.map +1 -0
  169. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.js +3 -0
  170. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.dom.js.map +1 -0
  171. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.d.ts +85 -0
  172. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.d.ts.map +1 -0
  173. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.js +264 -0
  174. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.errors.js.map +1 -0
  175. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.js +689 -0
  176. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/module/lib/webauthn.js.map +1 -0
  177. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/tsconfig.module.tsbuildinfo +1 -0
  178. package/templates/realtime-agent/node_modules/@supabase/auth-js/dist/tsconfig.tsbuildinfo +1 -0
  179. package/templates/realtime-agent/node_modules/@supabase/auth-js/package.json +44 -0
  180. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/AuthAdminApi.ts +5 -0
  181. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/AuthClient.ts +5 -0
  182. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/GoTrueAdminApi.ts +1267 -0
  183. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/GoTrueClient.ts +6360 -0
  184. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/index.ts +13 -0
  185. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/base64url.ts +308 -0
  186. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/constants.ts +34 -0
  187. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/error-codes.ts +90 -0
  188. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/errors.ts +359 -0
  189. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/fetch.ts +320 -0
  190. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/helpers.ts +476 -0
  191. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/local-storage.ts +21 -0
  192. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/locks.ts +420 -0
  193. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/polyfills.ts +23 -0
  194. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/types.ts +2917 -0
  195. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/version.ts +7 -0
  196. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/web3/ethereum.ts +184 -0
  197. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/web3/solana.ts +186 -0
  198. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/webauthn.dom.ts +636 -0
  199. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/webauthn.errors.ts +329 -0
  200. package/templates/realtime-agent/node_modules/@supabase/auth-js/src/lib/webauthn.ts +946 -0
  201. package/templates/realtime-agent/node_modules/@supabase/functions-js/README.md +134 -0
  202. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.d.ts +177 -0
  203. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.d.ts.map +1 -0
  204. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js +309 -0
  205. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/FunctionsClient.js.map +1 -0
  206. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.d.ts +3 -0
  207. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.d.ts.map +1 -0
  208. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.js +11 -0
  209. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/helper.js.map +1 -0
  210. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.d.ts +3 -0
  211. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.d.ts.map +1 -0
  212. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.js +12 -0
  213. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/index.js.map +1 -0
  214. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.d.ts +122 -0
  215. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.d.ts.map +1 -0
  216. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.js +98 -0
  217. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/types.js.map +1 -0
  218. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.d.ts +2 -0
  219. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.d.ts.map +1 -0
  220. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.js +11 -0
  221. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/main/version.js.map +1 -0
  222. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.d.ts +177 -0
  223. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.d.ts.map +1 -0
  224. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.js +305 -0
  225. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/FunctionsClient.js.map +1 -0
  226. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.d.ts +3 -0
  227. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.d.ts.map +1 -0
  228. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.js +7 -0
  229. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/helper.js.map +1 -0
  230. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.d.ts +3 -0
  231. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.d.ts.map +1 -0
  232. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.js +3 -0
  233. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/index.js.map +1 -0
  234. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.d.ts +122 -0
  235. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.d.ts.map +1 -0
  236. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.js +91 -0
  237. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/types.js.map +1 -0
  238. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.d.ts +2 -0
  239. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.d.ts.map +1 -0
  240. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.js +8 -0
  241. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/module/version.js.map +1 -0
  242. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/tsconfig.module.tsbuildinfo +1 -0
  243. package/templates/realtime-agent/node_modules/@supabase/functions-js/dist/tsconfig.tsbuildinfo +1 -0
  244. package/templates/realtime-agent/node_modules/@supabase/functions-js/package.json +52 -0
  245. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/FunctionsClient.ts +335 -0
  246. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/edge-runtime.d.ts +214 -0
  247. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/helper.ts +8 -0
  248. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/index.ts +10 -0
  249. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/types.ts +146 -0
  250. package/templates/realtime-agent/node_modules/@supabase/functions-js/src/version.ts +7 -0
  251. package/templates/realtime-agent/node_modules/@supabase/phoenix/LICENSE.md +22 -0
  252. package/templates/realtime-agent/node_modules/@supabase/phoenix/README.md +121 -0
  253. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/ajax.js +116 -0
  254. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/channel.js +331 -0
  255. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/constants.js +35 -0
  256. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/index.js +212 -0
  257. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/longpoll.js +192 -0
  258. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/presence.js +208 -0
  259. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/push.js +134 -0
  260. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/serializer.js +133 -0
  261. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/socket.js +756 -0
  262. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/timer.js +48 -0
  263. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/types.js +184 -0
  264. package/templates/realtime-agent/node_modules/@supabase/phoenix/assets/js/phoenix/utils.js +16 -0
  265. package/templates/realtime-agent/node_modules/@supabase/phoenix/package.json +58 -0
  266. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/favicon.ico +0 -0
  267. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix-orange.png +0 -0
  268. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.cjs.js +1825 -0
  269. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.cjs.js.map +7 -0
  270. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.js +1847 -0
  271. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.min.js +2 -0
  272. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.mjs +1802 -0
  273. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.mjs.map +7 -0
  274. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/phoenix.png +0 -0
  275. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/ajax.d.ts +10 -0
  276. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/ajax.d.ts.map +1 -0
  277. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/channel.d.ts +167 -0
  278. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/channel.d.ts.map +1 -0
  279. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/constants.d.ts +36 -0
  280. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/constants.d.ts.map +1 -0
  281. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/index.d.ts +10 -0
  282. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/index.d.ts.map +1 -0
  283. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/longpoll.d.ts +29 -0
  284. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/longpoll.d.ts.map +1 -0
  285. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/presence.d.ts +107 -0
  286. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/presence.d.ts.map +1 -0
  287. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/push.d.ts +70 -0
  288. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/push.d.ts.map +1 -0
  289. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/serializer.d.ts +74 -0
  290. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/serializer.d.ts.map +1 -0
  291. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/socket.d.ts +291 -0
  292. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/socket.d.ts.map +1 -0
  293. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/timer.d.ts +36 -0
  294. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/timer.d.ts.map +1 -0
  295. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/types.d.ts +280 -0
  296. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/types.d.ts.map +1 -0
  297. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/utils.d.ts +2 -0
  298. package/templates/realtime-agent/node_modules/@supabase/phoenix/priv/static/types/utils.d.ts.map +1 -0
  299. package/templates/realtime-agent/node_modules/@supabase/phoenix/tsconfig.json +20 -0
  300. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/README.md +213 -0
  301. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.cjs +5025 -0
  302. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.cjs.map +1 -0
  303. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.cts +3828 -0
  304. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.cts.map +1 -0
  305. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.mts +3828 -0
  306. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.d.mts.map +1 -0
  307. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.mjs +5017 -0
  308. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/dist/index.mjs.map +1 -0
  309. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/package.json +69 -0
  310. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestBuilder.ts +688 -0
  311. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestClient.ts +447 -0
  312. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestError.ts +41 -0
  313. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestFilterBuilder.ts +2137 -0
  314. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestQueryBuilder.ts +1703 -0
  315. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/PostgrestTransformBuilder.ts +981 -0
  316. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/constants.ts +2 -0
  317. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/index.ts +34 -0
  318. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/parser.ts +476 -0
  319. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/result.ts +550 -0
  320. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/types.ts +129 -0
  321. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/select-query-parser/utils.ts +704 -0
  322. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/common/common.ts +83 -0
  323. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/common/rpc.ts +148 -0
  324. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/feature-flags.ts +17 -0
  325. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/types/types.ts +161 -0
  326. package/templates/realtime-agent/node_modules/@supabase/postgrest-js/src/version.ts +7 -0
  327. package/templates/realtime-agent/node_modules/@supabase/realtime-js/README.md +326 -0
  328. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.d.ts +442 -0
  329. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.d.ts.map +1 -0
  330. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js +719 -0
  331. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeChannel.js.map +1 -0
  332. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.d.ts +275 -0
  333. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.d.ts.map +1 -0
  334. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js +697 -0
  335. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimeClient.js.map +1 -0
  336. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.d.ts +62 -0
  337. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.d.ts.map +1 -0
  338. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js +43 -0
  339. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/RealtimePresence.js.map +1 -0
  340. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.d.ts +6 -0
  341. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.d.ts.map +1 -0
  342. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.js +18 -0
  343. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/index.js.map +1 -0
  344. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.d.ts +43 -0
  345. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.d.ts.map +1 -0
  346. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.js +43 -0
  347. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/constants.js.map +1 -0
  348. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.d.ts +10 -0
  349. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.d.ts.map +1 -0
  350. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.js +29 -0
  351. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/normalizeChannelError.js.map +1 -0
  352. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.d.ts +33 -0
  353. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.d.ts.map +1 -0
  354. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.js +155 -0
  355. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/serializer.js.map +1 -0
  356. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.d.ts +109 -0
  357. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.d.ts.map +1 -0
  358. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.js +241 -0
  359. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/transformers.js.map +1 -0
  360. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.d.ts +2 -0
  361. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.d.ts.map +1 -0
  362. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.js +11 -0
  363. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/version.js.map +1 -0
  364. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.d.ts +82 -0
  365. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.d.ts.map +1 -0
  366. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.js +130 -0
  367. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/lib/websocket-factory.js.map +1 -0
  368. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.d.ts +32 -0
  369. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.d.ts.map +1 -0
  370. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.js +103 -0
  371. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/channelAdapter.js.map +1 -0
  372. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.d.ts +53 -0
  373. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.d.ts.map +1 -0
  374. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.js +93 -0
  375. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/presenceAdapter.js.map +1 -0
  376. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.d.ts +38 -0
  377. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.d.ts.map +1 -0
  378. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.js +114 -0
  379. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/socketAdapter.js.map +1 -0
  380. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.d.ts +5 -0
  381. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.d.ts.map +1 -0
  382. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.js +3 -0
  383. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/main/phoenix/types.js.map +1 -0
  384. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.d.ts +442 -0
  385. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.d.ts.map +1 -0
  386. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.js +714 -0
  387. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeChannel.js.map +1 -0
  388. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.d.ts +275 -0
  389. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.d.ts.map +1 -0
  390. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js +693 -0
  391. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimeClient.js.map +1 -0
  392. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.d.ts +62 -0
  393. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.d.ts.map +1 -0
  394. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.js +38 -0
  395. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/RealtimePresence.js.map +1 -0
  396. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.d.ts +6 -0
  397. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.d.ts.map +1 -0
  398. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.js +6 -0
  399. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/index.js.map +1 -0
  400. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.d.ts +43 -0
  401. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.d.ts.map +1 -0
  402. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.js +40 -0
  403. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/constants.js.map +1 -0
  404. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.d.ts +10 -0
  405. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.d.ts.map +1 -0
  406. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.js +26 -0
  407. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/normalizeChannelError.js.map +1 -0
  408. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.d.ts +33 -0
  409. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.d.ts.map +1 -0
  410. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.js +152 -0
  411. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/serializer.js.map +1 -0
  412. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.d.ts +109 -0
  413. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.d.ts.map +1 -0
  414. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.js +229 -0
  415. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/transformers.js.map +1 -0
  416. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.d.ts +2 -0
  417. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.d.ts.map +1 -0
  418. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.js +8 -0
  419. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/version.js.map +1 -0
  420. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.d.ts +82 -0
  421. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.d.ts.map +1 -0
  422. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.js +126 -0
  423. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/lib/websocket-factory.js.map +1 -0
  424. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.d.ts +32 -0
  425. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.d.ts.map +1 -0
  426. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.js +100 -0
  427. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/channelAdapter.js.map +1 -0
  428. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.d.ts +53 -0
  429. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.d.ts.map +1 -0
  430. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.js +90 -0
  431. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/presenceAdapter.js.map +1 -0
  432. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.d.ts +38 -0
  433. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.d.ts.map +1 -0
  434. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.js +111 -0
  435. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/socketAdapter.js.map +1 -0
  436. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.d.ts +5 -0
  437. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.d.ts.map +1 -0
  438. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.js +2 -0
  439. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/module/phoenix/types.js.map +1 -0
  440. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/tsconfig.module.tsbuildinfo +1 -0
  441. package/templates/realtime-agent/node_modules/@supabase/realtime-js/dist/tsconfig.tsbuildinfo +1 -0
  442. package/templates/realtime-agent/node_modules/@supabase/realtime-js/package.json +58 -0
  443. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/RealtimeChannel.ts +1118 -0
  444. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/RealtimeClient.ts +868 -0
  445. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/RealtimePresence.ts +71 -0
  446. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/index.ts +53 -0
  447. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/constants.ts +62 -0
  448. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/normalizeChannelError.ts +30 -0
  449. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/serializer.ts +203 -0
  450. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/transformers.ts +270 -0
  451. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/version.ts +7 -0
  452. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/lib/websocket-factory.ts +204 -0
  453. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/channelAdapter.ts +149 -0
  454. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/presenceAdapter.ts +116 -0
  455. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/socketAdapter.ts +168 -0
  456. package/templates/realtime-agent/node_modules/@supabase/realtime-js/src/phoenix/types.ts +32 -0
  457. package/templates/realtime-agent/node_modules/@supabase/storage-js/README.md +1262 -0
  458. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.cjs +2995 -0
  459. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.cjs.map +1 -0
  460. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.cts +2956 -0
  461. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.cts.map +1 -0
  462. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.mts +2956 -0
  463. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.d.mts.map +1 -0
  464. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.mjs +2979 -0
  465. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/index.mjs.map +1 -0
  466. package/templates/realtime-agent/node_modules/@supabase/storage-js/dist/umd/supabase.js +1 -0
  467. package/templates/realtime-agent/node_modules/@supabase/storage-js/package.json +62 -0
  468. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/StorageClient.ts +98 -0
  469. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/index.ts +19 -0
  470. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/BaseApiClient.ts +104 -0
  471. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/errors.ts +160 -0
  472. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/fetch.ts +303 -0
  473. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/headers.ts +43 -0
  474. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/common/helpers.ts +146 -0
  475. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/constants.ts +4 -0
  476. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/types.ts +654 -0
  477. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/lib/version.ts +7 -0
  478. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/BlobDownloadBuilder.ts +62 -0
  479. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageAnalyticsClient.ts +420 -0
  480. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageBucketApi.ts +414 -0
  481. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageFileApi.ts +1423 -0
  482. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StorageVectorsClient.ts +644 -0
  483. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/StreamDownloadBuilder.ts +39 -0
  484. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/VectorBucketApi.ts +73 -0
  485. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/VectorDataApi.ts +98 -0
  486. package/templates/realtime-agent/node_modules/@supabase/storage-js/src/packages/VectorIndexApi.ts +90 -0
  487. package/templates/realtime-agent/node_modules/@supabase/supabase-js/README.md +238 -0
  488. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.cjs +89 -0
  489. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.cjs.map +1 -0
  490. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.cts +58 -0
  491. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.cts.map +1 -0
  492. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.mts +58 -0
  493. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.d.mts.map +1 -0
  494. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.mjs +88 -0
  495. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/cors.mjs.map +1 -0
  496. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.cjs +660 -0
  497. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.cjs.map +1 -0
  498. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.cts +616 -0
  499. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.cts.map +1 -0
  500. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.mts +616 -0
  501. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.d.mts.map +1 -0
  502. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.mjs +607 -0
  503. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/index.mjs.map +1 -0
  504. package/templates/realtime-agent/node_modules/@supabase/supabase-js/dist/umd/supabase.js +24 -0
  505. package/templates/realtime-agent/node_modules/@supabase/supabase-js/package.json +122 -0
  506. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/SupabaseClient.ts +625 -0
  507. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/cors.ts +84 -0
  508. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/index.ts +106 -0
  509. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/SupabaseAuthClient.ts +8 -0
  510. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/constants.ts +35 -0
  511. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/fetch.ts +36 -0
  512. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/helpers.ts +98 -0
  513. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/rest/types/common/common.ts +93 -0
  514. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/rest/types/common/rpc.ts +158 -0
  515. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/types.ts +196 -0
  516. package/templates/realtime-agent/node_modules/@supabase/supabase-js/src/lib/version.ts +7 -0
  517. package/templates/realtime-agent/node_modules/iceberg-js/LICENSE +21 -0
  518. package/templates/realtime-agent/node_modules/iceberg-js/README.md +439 -0
  519. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.cjs +596 -0
  520. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.cjs.map +1 -0
  521. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.d.cts +547 -0
  522. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.d.ts +547 -0
  523. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.mjs +587 -0
  524. package/templates/realtime-agent/node_modules/iceberg-js/dist/index.mjs.map +1 -0
  525. package/templates/realtime-agent/node_modules/iceberg-js/package.json +77 -0
  526. package/templates/realtime-agent/node_modules/tslib/CopyrightNotice.txt +15 -0
  527. package/templates/realtime-agent/node_modules/tslib/LICENSE.txt +12 -0
  528. package/templates/realtime-agent/node_modules/tslib/README.md +164 -0
  529. package/templates/realtime-agent/node_modules/tslib/SECURITY.md +41 -0
  530. package/templates/realtime-agent/node_modules/tslib/modules/index.d.ts +38 -0
  531. package/templates/realtime-agent/node_modules/tslib/modules/index.js +70 -0
  532. package/templates/realtime-agent/node_modules/tslib/modules/package.json +3 -0
  533. package/templates/realtime-agent/node_modules/tslib/package.json +47 -0
  534. package/templates/realtime-agent/node_modules/tslib/tslib.d.ts +460 -0
  535. package/templates/realtime-agent/node_modules/tslib/tslib.es6.html +1 -0
  536. package/templates/realtime-agent/node_modules/tslib/tslib.es6.js +402 -0
  537. package/templates/realtime-agent/node_modules/tslib/tslib.es6.mjs +401 -0
  538. package/templates/realtime-agent/node_modules/tslib/tslib.html +1 -0
  539. package/templates/realtime-agent/node_modules/tslib/tslib.js +484 -0
  540. package/templates/realtime-agent/package-lock.json +114 -0
  541. package/templates/realtime-agent/package.json +11 -0
  542. package/templates/realtime-agent/src/index.js +152 -0
  543. package/templates/root/AGENT.md +37 -0
  544. package/templates/root/model.md +1 -0
  545. package/templates/root/prompt.md +91 -0
  546. package/templates/root/ralph.sh +47 -0
@@ -0,0 +1,2473 @@
1
+ import GoTrueAdminApi from './GoTrueAdminApi';
2
+ import { AuthError } from './lib/errors';
3
+ import { Fetch } from './lib/fetch';
4
+ import { Deferred } from './lib/helpers';
5
+ import type { AuthChangeEvent, AuthFlowType, AuthOtpResponse, AuthResponse, AuthTokenResponse, AuthTokenResponsePassword, CallRefreshTokenResult, GoTrueClientOptions, GoTrueMFAApi, InitializeResult, JWK, JwtHeader, JwtPayload, LockFunc, OAuthResponse, AuthOAuthServerApi, ResendParams, Session, SignInAnonymouslyCredentials, SignInWithIdTokenCredentials, SignInWithOAuthCredentials, SignInWithPasswordCredentials, SignInWithPasswordlessCredentials, SignInWithSSO, SignOut, SignUpWithPasswordCredentials, SSOResponse, Subscription, SupportedStorage, User, UserAttributes, UserIdentity, UserResponse, VerifyOtpParams, Web3Credentials, AuthPasskeyApi, ExperimentalFeatureFlags, SignInWithPasskeyCredentials, RegisterPasskeyCredentials, AuthPasskeyRegistrationVerifyResponse, AuthPasskeyAuthenticationVerifyResponse } from './lib/types';
6
+ export default class GoTrueClient {
7
+ private static nextInstanceID;
8
+ private instanceID;
9
+ /**
10
+ * Namespace for the GoTrue admin methods.
11
+ * These methods should only be used in a trusted server-side environment.
12
+ */
13
+ admin: GoTrueAdminApi;
14
+ /**
15
+ * Namespace for the MFA methods.
16
+ */
17
+ mfa: GoTrueMFAApi;
18
+ /**
19
+ * Namespace for the OAuth 2.1 authorization server methods.
20
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
21
+ * Used to implement the authorization code flow on the consent page.
22
+ */
23
+ oauth: AuthOAuthServerApi;
24
+ /**
25
+ * Namespace for passkey methods.
26
+ * Includes lower-level two-step registration/authentication and passkey management.
27
+ *
28
+ * Requires `auth.experimental.passkey: true`; otherwise all methods throw.
29
+ */
30
+ passkey: AuthPasskeyApi;
31
+ /**
32
+ * The storage key used to identify the values saved in localStorage
33
+ */
34
+ protected storageKey: string;
35
+ protected flowType: AuthFlowType;
36
+ /**
37
+ * The JWKS used for verifying asymmetric JWTs
38
+ */
39
+ protected get jwks(): {
40
+ keys: JWK[];
41
+ };
42
+ protected set jwks(value: {
43
+ keys: JWK[];
44
+ });
45
+ protected get jwks_cached_at(): number;
46
+ protected set jwks_cached_at(value: number);
47
+ protected autoRefreshToken: boolean;
48
+ protected persistSession: boolean;
49
+ protected storage: SupportedStorage;
50
+ /**
51
+ * @experimental
52
+ */
53
+ protected userStorage: SupportedStorage | null;
54
+ protected memoryStorage: {
55
+ [key: string]: string;
56
+ } | null;
57
+ protected stateChangeEmitters: Map<string | symbol, Subscription>;
58
+ protected autoRefreshTicker: ReturnType<typeof setInterval> | null;
59
+ protected autoRefreshTickTimeout: ReturnType<typeof setTimeout> | null;
60
+ protected visibilityChangedCallback: (() => Promise<any>) | null;
61
+ protected refreshingDeferred: Deferred<CallRefreshTokenResult> | null;
62
+ /**
63
+ * Keeps track of the async client initialization.
64
+ * When null or not yet resolved the auth state is `unknown`
65
+ * Once resolved the auth state is known and it's safe to call any further client methods.
66
+ * Keep extra care to never reject or throw uncaught errors
67
+ */
68
+ protected initializePromise: Promise<InitializeResult> | null;
69
+ protected detectSessionInUrl: boolean | ((url: URL, params: {
70
+ [parameter: string]: string;
71
+ }) => boolean);
72
+ protected url: string;
73
+ protected headers: {
74
+ [key: string]: string;
75
+ };
76
+ protected hasCustomAuthorizationHeader: boolean;
77
+ protected suppressGetSessionWarning: boolean;
78
+ protected fetch: Fetch;
79
+ protected lock: LockFunc;
80
+ protected lockAcquired: boolean;
81
+ protected pendingInLock: Promise<any>[];
82
+ protected throwOnError: boolean;
83
+ protected lockAcquireTimeout: number;
84
+ /**
85
+ * Opt-in flags for experimental features. Defaults to an empty object.
86
+ * See `GoTrueClientOptions.experimental`.
87
+ */
88
+ protected experimental: ExperimentalFeatureFlags;
89
+ /**
90
+ * Used to broadcast state change events to other tabs listening.
91
+ */
92
+ protected broadcastChannel: BroadcastChannel | null;
93
+ protected logDebugMessages: boolean;
94
+ protected logger: (message: string, ...args: any[]) => void;
95
+ /**
96
+ * Create a new client for use in the browser.
97
+ *
98
+ * @example Using supabase-js (recommended)
99
+ * ```ts
100
+ * import { createClient } from '@supabase/supabase-js'
101
+ *
102
+ * const supabase = createClient('https://xyzcompany.supabase.co', 'your-publishable-key')
103
+ * const { data, error } = await supabase.auth.getUser()
104
+ * ```
105
+ *
106
+ * @example Standalone import for bundle-sensitive environments
107
+ * ```ts
108
+ * import { GoTrueClient } from '@supabase/auth-js'
109
+ *
110
+ * const auth = new GoTrueClient({
111
+ * url: 'https://xyzcompany.supabase.co/auth/v1',
112
+ * headers: { apikey: 'your-publishable-key' },
113
+ * storageKey: 'supabase-auth',
114
+ * })
115
+ * ```
116
+ */
117
+ constructor(options: GoTrueClientOptions);
118
+ /**
119
+ * Returns whether error throwing mode is enabled for this client.
120
+ */
121
+ isThrowOnErrorEnabled(): boolean;
122
+ /**
123
+ * Centralizes return handling with optional error throwing. When `throwOnError` is enabled
124
+ * and the provided result contains a non-nullish error, the error is thrown instead of
125
+ * being returned. This ensures consistent behavior across all public API methods.
126
+ */
127
+ private _returnResult;
128
+ private _logPrefix;
129
+ private _debug;
130
+ /**
131
+ * Initializes the client session either from the url or from storage.
132
+ * This method is automatically called when instantiating the client, but should also be called
133
+ * manually when checking for an error from an auth redirect (oauth, magiclink, password recovery, etc).
134
+ *
135
+ * @category Auth
136
+ */
137
+ initialize(): Promise<InitializeResult>;
138
+ /**
139
+ * IMPORTANT:
140
+ * 1. Never throw in this method, as it is called from the constructor
141
+ * 2. Never return a session from this method as it would be cached over
142
+ * the whole lifetime of the client
143
+ */
144
+ private _initialize;
145
+ /**
146
+ * Creates a new anonymous user.
147
+ *
148
+ * @returns A session where the is_anonymous claim in the access token JWT set to true
149
+ *
150
+ * @category Auth
151
+ *
152
+ * @remarks
153
+ * - Returns an anonymous user
154
+ * - It is recommended to set up captcha for anonymous sign-ins to prevent abuse. You can pass in the captcha token in the `options` param.
155
+ *
156
+ * @example Create an anonymous user
157
+ * ```js
158
+ * const { data, error } = await supabase.auth.signInAnonymously({
159
+ * options: {
160
+ * captchaToken
161
+ * }
162
+ * });
163
+ * ```
164
+ *
165
+ * @exampleResponse Create an anonymous user
166
+ * ```json
167
+ * {
168
+ * "data": {
169
+ * "user": {
170
+ * "id": "11111111-1111-1111-1111-111111111111",
171
+ * "aud": "authenticated",
172
+ * "role": "authenticated",
173
+ * "email": "",
174
+ * "phone": "",
175
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
176
+ * "app_metadata": {},
177
+ * "user_metadata": {},
178
+ * "identities": [],
179
+ * "created_at": "2024-01-01T00:00:00Z",
180
+ * "updated_at": "2024-01-01T00:00:00Z",
181
+ * "is_anonymous": true
182
+ * },
183
+ * "session": {
184
+ * "access_token": "<ACCESS_TOKEN>",
185
+ * "token_type": "bearer",
186
+ * "expires_in": 3600,
187
+ * "expires_at": 1700000000,
188
+ * "refresh_token": "<REFRESH_TOKEN>",
189
+ * "user": {
190
+ * "id": "11111111-1111-1111-1111-111111111111",
191
+ * "aud": "authenticated",
192
+ * "role": "authenticated",
193
+ * "email": "",
194
+ * "phone": "",
195
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
196
+ * "app_metadata": {},
197
+ * "user_metadata": {},
198
+ * "identities": [],
199
+ * "created_at": "2024-01-01T00:00:00Z",
200
+ * "updated_at": "2024-01-01T00:00:00Z",
201
+ * "is_anonymous": true
202
+ * }
203
+ * }
204
+ * },
205
+ * "error": null
206
+ * }
207
+ * ```
208
+ *
209
+ * @example Create an anonymous user with custom user metadata
210
+ * ```js
211
+ * const { data, error } = await supabase.auth.signInAnonymously({
212
+ * options: {
213
+ * data
214
+ * }
215
+ * })
216
+ * ```
217
+ */
218
+ signInAnonymously(credentials?: SignInAnonymouslyCredentials): Promise<AuthResponse>;
219
+ /**
220
+ * Creates a new user.
221
+ *
222
+ * Be aware that if a user account exists in the system you may get back an
223
+ * error message that attempts to hide this information from the user.
224
+ * This method has support for PKCE via email signups. The PKCE flow cannot be used when autoconfirm is enabled.
225
+ *
226
+ * @returns A logged-in session if the server has "autoconfirm" ON
227
+ * @returns A user if the server has "autoconfirm" OFF
228
+ *
229
+ * @category Auth
230
+ *
231
+ * @remarks
232
+ * - By default, the user needs to verify their email address before logging in. To turn this off, disable **Confirm email** in [your project](/dashboard/project/_/auth/providers).
233
+ * - **Confirm email** determines if users need to confirm their email address after signing up.
234
+ * - If **Confirm email** is enabled, a `user` is returned but `session` is null.
235
+ * - If **Confirm email** is disabled, both a `user` and a `session` are returned.
236
+ * - When the user confirms their email address, they are redirected to the [`SITE_URL`](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls) by default. You can modify your `SITE_URL` or add additional redirect URLs in [your project](/dashboard/project/_/auth/url-configuration).
237
+ * - If signUp() is called for an existing confirmed user:
238
+ * - When both **Confirm email** and **Confirm phone** (even when phone provider is disabled) are enabled in [your project](/dashboard/project/_/auth/providers), an obfuscated/fake user object is returned.
239
+ * - When either **Confirm email** or **Confirm phone** (even when phone provider is disabled) is disabled, the error message, `User already registered` is returned.
240
+ * - To fetch the currently logged-in user, refer to [`getUser()`](/docs/reference/javascript/auth-getuser).
241
+ *
242
+ * @example Sign up with an email and password
243
+ * ```js
244
+ * const { data, error } = await supabase.auth.signUp({
245
+ * email: 'example@email.com',
246
+ * password: 'example-password',
247
+ * })
248
+ * ```
249
+ *
250
+ * @exampleResponse Sign up with an email and password
251
+ * ```json
252
+ * // Some fields may be null if "confirm email" is enabled.
253
+ * {
254
+ * "data": {
255
+ * "user": {
256
+ * "id": "11111111-1111-1111-1111-111111111111",
257
+ * "aud": "authenticated",
258
+ * "role": "authenticated",
259
+ * "email": "example@email.com",
260
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
261
+ * "phone": "",
262
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
263
+ * "app_metadata": {
264
+ * "provider": "email",
265
+ * "providers": [
266
+ * "email"
267
+ * ]
268
+ * },
269
+ * "user_metadata": {},
270
+ * "identities": [
271
+ * {
272
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
273
+ * "id": "11111111-1111-1111-1111-111111111111",
274
+ * "user_id": "11111111-1111-1111-1111-111111111111",
275
+ * "identity_data": {
276
+ * "email": "example@email.com",
277
+ * "email_verified": false,
278
+ * "phone_verified": false,
279
+ * "sub": "11111111-1111-1111-1111-111111111111"
280
+ * },
281
+ * "provider": "email",
282
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
283
+ * "created_at": "2024-01-01T00:00:00Z",
284
+ * "updated_at": "2024-01-01T00:00:00Z",
285
+ * "email": "example@email.com"
286
+ * }
287
+ * ],
288
+ * "created_at": "2024-01-01T00:00:00Z",
289
+ * "updated_at": "2024-01-01T00:00:00Z"
290
+ * },
291
+ * "session": {
292
+ * "access_token": "<ACCESS_TOKEN>",
293
+ * "token_type": "bearer",
294
+ * "expires_in": 3600,
295
+ * "expires_at": 1700000000,
296
+ * "refresh_token": "<REFRESH_TOKEN>",
297
+ * "user": {
298
+ * "id": "11111111-1111-1111-1111-111111111111",
299
+ * "aud": "authenticated",
300
+ * "role": "authenticated",
301
+ * "email": "example@email.com",
302
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
303
+ * "phone": "",
304
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
305
+ * "app_metadata": {
306
+ * "provider": "email",
307
+ * "providers": [
308
+ * "email"
309
+ * ]
310
+ * },
311
+ * "user_metadata": {},
312
+ * "identities": [
313
+ * {
314
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
315
+ * "id": "11111111-1111-1111-1111-111111111111",
316
+ * "user_id": "11111111-1111-1111-1111-111111111111",
317
+ * "identity_data": {
318
+ * "email": "example@email.com",
319
+ * "email_verified": false,
320
+ * "phone_verified": false,
321
+ * "sub": "11111111-1111-1111-1111-111111111111"
322
+ * },
323
+ * "provider": "email",
324
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
325
+ * "created_at": "2024-01-01T00:00:00Z",
326
+ * "updated_at": "2024-01-01T00:00:00Z",
327
+ * "email": "example@email.com"
328
+ * }
329
+ * ],
330
+ * "created_at": "2024-01-01T00:00:00Z",
331
+ * "updated_at": "2024-01-01T00:00:00Z"
332
+ * }
333
+ * }
334
+ * },
335
+ * "error": null
336
+ * }
337
+ * ```
338
+ *
339
+ * @example Sign up with a phone number and password (SMS)
340
+ * ```js
341
+ * const { data, error } = await supabase.auth.signUp({
342
+ * phone: '123456789',
343
+ * password: 'example-password',
344
+ * options: {
345
+ * channel: 'sms'
346
+ * }
347
+ * })
348
+ * ```
349
+ *
350
+ * @exampleDescription Sign up with a phone number and password (whatsapp)
351
+ * The user will be sent a WhatsApp message which contains a OTP. By default, a given user can only request a OTP once every 60 seconds. Note that a user will need to have a valid WhatsApp account that is linked to Twilio in order to use this feature.
352
+ *
353
+ * @example Sign up with a phone number and password (whatsapp)
354
+ * ```js
355
+ * const { data, error } = await supabase.auth.signUp({
356
+ * phone: '123456789',
357
+ * password: 'example-password',
358
+ * options: {
359
+ * channel: 'whatsapp'
360
+ * }
361
+ * })
362
+ * ```
363
+ *
364
+ * @example Sign up with additional user metadata
365
+ * ```js
366
+ * const { data, error } = await supabase.auth.signUp(
367
+ * {
368
+ * email: 'example@email.com',
369
+ * password: 'example-password',
370
+ * options: {
371
+ * data: {
372
+ * first_name: 'John',
373
+ * age: 27,
374
+ * }
375
+ * }
376
+ * }
377
+ * )
378
+ * ```
379
+ *
380
+ * @exampleDescription Sign up with a redirect URL
381
+ * - See [redirect URLs and wildcards](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls) to add additional redirect URLs to your project.
382
+ *
383
+ * @example Sign up with a redirect URL
384
+ * ```js
385
+ * const { data, error } = await supabase.auth.signUp(
386
+ * {
387
+ * email: 'example@email.com',
388
+ * password: 'example-password',
389
+ * options: {
390
+ * emailRedirectTo: 'https://example.com/welcome'
391
+ * }
392
+ * }
393
+ * )
394
+ * ```
395
+ */
396
+ signUp(credentials: SignUpWithPasswordCredentials): Promise<AuthResponse>;
397
+ /**
398
+ * Log in an existing user with an email and password or phone and password.
399
+ *
400
+ * Be aware that you may get back an error message that will not distinguish
401
+ * between the cases where the account does not exist or that the
402
+ * email/phone and password combination is wrong or that the account can only
403
+ * be accessed via social login.
404
+ *
405
+ * @category Auth
406
+ *
407
+ * @remarks
408
+ * - Requires either an email and password or a phone number and password.
409
+ *
410
+ * @example Sign in with email and password
411
+ * ```js
412
+ * const { data, error } = await supabase.auth.signInWithPassword({
413
+ * email: 'example@email.com',
414
+ * password: 'example-password',
415
+ * })
416
+ * ```
417
+ *
418
+ * @exampleResponse Sign in with email and password
419
+ * ```json
420
+ * {
421
+ * "data": {
422
+ * "user": {
423
+ * "id": "11111111-1111-1111-1111-111111111111",
424
+ * "aud": "authenticated",
425
+ * "role": "authenticated",
426
+ * "email": "example@email.com",
427
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
428
+ * "phone": "",
429
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
430
+ * "app_metadata": {
431
+ * "provider": "email",
432
+ * "providers": [
433
+ * "email"
434
+ * ]
435
+ * },
436
+ * "user_metadata": {},
437
+ * "identities": [
438
+ * {
439
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
440
+ * "id": "11111111-1111-1111-1111-111111111111",
441
+ * "user_id": "11111111-1111-1111-1111-111111111111",
442
+ * "identity_data": {
443
+ * "email": "example@email.com",
444
+ * "email_verified": false,
445
+ * "phone_verified": false,
446
+ * "sub": "11111111-1111-1111-1111-111111111111"
447
+ * },
448
+ * "provider": "email",
449
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
450
+ * "created_at": "2024-01-01T00:00:00Z",
451
+ * "updated_at": "2024-01-01T00:00:00Z",
452
+ * "email": "example@email.com"
453
+ * }
454
+ * ],
455
+ * "created_at": "2024-01-01T00:00:00Z",
456
+ * "updated_at": "2024-01-01T00:00:00Z"
457
+ * },
458
+ * "session": {
459
+ * "access_token": "<ACCESS_TOKEN>",
460
+ * "token_type": "bearer",
461
+ * "expires_in": 3600,
462
+ * "expires_at": 1700000000,
463
+ * "refresh_token": "<REFRESH_TOKEN>",
464
+ * "user": {
465
+ * "id": "11111111-1111-1111-1111-111111111111",
466
+ * "aud": "authenticated",
467
+ * "role": "authenticated",
468
+ * "email": "example@email.com",
469
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
470
+ * "phone": "",
471
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
472
+ * "app_metadata": {
473
+ * "provider": "email",
474
+ * "providers": [
475
+ * "email"
476
+ * ]
477
+ * },
478
+ * "user_metadata": {},
479
+ * "identities": [
480
+ * {
481
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
482
+ * "id": "11111111-1111-1111-1111-111111111111",
483
+ * "user_id": "11111111-1111-1111-1111-111111111111",
484
+ * "identity_data": {
485
+ * "email": "example@email.com",
486
+ * "email_verified": false,
487
+ * "phone_verified": false,
488
+ * "sub": "11111111-1111-1111-1111-111111111111"
489
+ * },
490
+ * "provider": "email",
491
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
492
+ * "created_at": "2024-01-01T00:00:00Z",
493
+ * "updated_at": "2024-01-01T00:00:00Z",
494
+ * "email": "example@email.com"
495
+ * }
496
+ * ],
497
+ * "created_at": "2024-01-01T00:00:00Z",
498
+ * "updated_at": "2024-01-01T00:00:00Z"
499
+ * }
500
+ * }
501
+ * },
502
+ * "error": null
503
+ * }
504
+ * ```
505
+ *
506
+ * @example Sign in with phone and password
507
+ * ```js
508
+ * const { data, error } = await supabase.auth.signInWithPassword({
509
+ * phone: '+13334445555',
510
+ * password: 'some-password',
511
+ * })
512
+ * ```
513
+ */
514
+ signInWithPassword(credentials: SignInWithPasswordCredentials): Promise<AuthTokenResponsePassword>;
515
+ /**
516
+ * Log in an existing user via a third-party provider.
517
+ * This method supports the PKCE flow.
518
+ *
519
+ * @category Auth
520
+ *
521
+ * @remarks
522
+ * - This method is used for signing in using [Social Login (OAuth) providers](/docs/guides/auth#configure-third-party-providers).
523
+ * - It works by redirecting your application to the provider's authorization screen, before bringing back the user to your app.
524
+ *
525
+ * @example Sign in using a third-party provider
526
+ * ```js
527
+ * const { data, error } = await supabase.auth.signInWithOAuth({
528
+ * provider: 'github'
529
+ * })
530
+ * ```
531
+ *
532
+ * @exampleResponse Sign in using a third-party provider
533
+ * ```json
534
+ * {
535
+ * data: {
536
+ * provider: 'github',
537
+ * url: <PROVIDER_URL_TO_REDIRECT_TO>
538
+ * },
539
+ * error: null
540
+ * }
541
+ * ```
542
+ *
543
+ * @exampleDescription Sign in using a third-party provider with redirect
544
+ * - When the OAuth provider successfully authenticates the user, they are redirected to the URL specified in the `redirectTo` parameter. This parameter defaults to the [`SITE_URL`](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls). It does not redirect the user immediately after invoking this method.
545
+ * - See [redirect URLs and wildcards](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls) to add additional redirect URLs to your project.
546
+ *
547
+ * @example Sign in using a third-party provider with redirect
548
+ * ```js
549
+ * const { data, error } = await supabase.auth.signInWithOAuth({
550
+ * provider: 'github',
551
+ * options: {
552
+ * redirectTo: 'https://example.com/welcome'
553
+ * }
554
+ * })
555
+ * ```
556
+ *
557
+ * @exampleDescription Sign in with scopes and access provider tokens
558
+ * If you need additional access from an OAuth provider, in order to access provider specific APIs in the name of the user, you can do this by passing in the scopes the user should authorize for your application. Note that the `scopes` option takes in **a space-separated list** of scopes.
559
+ *
560
+ * Because OAuth sign-in often includes redirects, you should register an `onAuthStateChange` callback immediately after you create the Supabase client. This callback will listen for the presence of `provider_token` and `provider_refresh_token` properties on the `session` object and store them in local storage. The client library will emit these values **only once** immediately after the user signs in. You can then access them by looking them up in local storage, or send them to your backend servers for further processing.
561
+ *
562
+ * Finally, make sure you remove them from local storage on the `SIGNED_OUT` event. If the OAuth provider supports token revocation, make sure you call those APIs either from the frontend or schedule them to be called on the backend.
563
+ *
564
+ * @example Sign in with scopes and access provider tokens
565
+ * ```js
566
+ * // Register this immediately after calling createClient!
567
+ * // Because signInWithOAuth causes a redirect, you need to fetch the
568
+ * // provider tokens from the callback.
569
+ * supabase.auth.onAuthStateChange((event, session) => {
570
+ * if (session && session.provider_token) {
571
+ * window.localStorage.setItem('oauth_provider_token', session.provider_token)
572
+ * }
573
+ *
574
+ * if (session && session.provider_refresh_token) {
575
+ * window.localStorage.setItem('oauth_provider_refresh_token', session.provider_refresh_token)
576
+ * }
577
+ *
578
+ * if (event === 'SIGNED_OUT') {
579
+ * window.localStorage.removeItem('oauth_provider_token')
580
+ * window.localStorage.removeItem('oauth_provider_refresh_token')
581
+ * }
582
+ * })
583
+ *
584
+ * // Call this on your Sign in with GitHub button to initiate OAuth
585
+ * // with GitHub with the requested elevated scopes.
586
+ * await supabase.auth.signInWithOAuth({
587
+ * provider: 'github',
588
+ * options: {
589
+ * scopes: 'repo gist notifications'
590
+ * }
591
+ * })
592
+ * ```
593
+ */
594
+ signInWithOAuth(credentials: SignInWithOAuthCredentials): Promise<OAuthResponse>;
595
+ /**
596
+ * Log in an existing user by exchanging an Auth Code issued during the PKCE flow.
597
+ *
598
+ * @category Auth
599
+ *
600
+ * @remarks
601
+ * - Used when `flowType` is set to `pkce` in client options.
602
+ *
603
+ * @example Exchange Auth Code
604
+ * ```js
605
+ * supabase.auth.exchangeCodeForSession('34e770dd-9ff9-416c-87fa-43b31d7ef225')
606
+ * ```
607
+ *
608
+ * @exampleResponse Exchange Auth Code
609
+ * ```json
610
+ * {
611
+ * "data": {
612
+ * session: {
613
+ * access_token: '<ACCESS_TOKEN>',
614
+ * token_type: 'bearer',
615
+ * expires_in: 3600,
616
+ * expires_at: 1700000000,
617
+ * refresh_token: '<REFRESH_TOKEN>',
618
+ * user: {
619
+ * id: '11111111-1111-1111-1111-111111111111',
620
+ * aud: 'authenticated',
621
+ * role: 'authenticated',
622
+ * email: 'example@email.com'
623
+ * email_confirmed_at: '2024-01-01T00:00:00Z',
624
+ * phone: '',
625
+ * confirmation_sent_at: '2024-01-01T00:00:00Z',
626
+ * confirmed_at: '2024-01-01T00:00:00Z',
627
+ * last_sign_in_at: '2024-01-01T00:00:00Z',
628
+ * app_metadata: {
629
+ * "provider": "email",
630
+ * "providers": [
631
+ * "email",
632
+ * "<OTHER_PROVIDER>"
633
+ * ]
634
+ * },
635
+ * user_metadata: {
636
+ * email: 'email@email.com',
637
+ * email_verified: true,
638
+ * full_name: 'User Name',
639
+ * iss: '<ISS>',
640
+ * name: 'User Name',
641
+ * phone_verified: false,
642
+ * provider_id: '<PROVIDER_ID>',
643
+ * sub: '<SUB>'
644
+ * },
645
+ * identities: [
646
+ * {
647
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
648
+ * "id": "11111111-1111-1111-1111-111111111111",
649
+ * "user_id": "11111111-1111-1111-1111-111111111111",
650
+ * "identity_data": {
651
+ * "email": "example@email.com",
652
+ * "email_verified": false,
653
+ * "phone_verified": false,
654
+ * "sub": "11111111-1111-1111-1111-111111111111"
655
+ * },
656
+ * "provider": "email",
657
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
658
+ * "created_at": "2024-01-01T00:00:00Z",
659
+ * "updated_at": "2024-01-01T00:00:00Z",
660
+ * "email": "email@example.com"
661
+ * },
662
+ * {
663
+ * "identity_id": "33333333-3333-3333-3333-333333333333",
664
+ * "id": "<ID>",
665
+ * "user_id": "<USER_ID>",
666
+ * "identity_data": {
667
+ * "email": "example@email.com",
668
+ * "email_verified": true,
669
+ * "full_name": "User Name",
670
+ * "iss": "<ISS>",
671
+ * "name": "User Name",
672
+ * "phone_verified": false,
673
+ * "provider_id": "<PROVIDER_ID>",
674
+ * "sub": "<SUB>"
675
+ * },
676
+ * "provider": "<PROVIDER>",
677
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
678
+ * "created_at": "2024-01-01T00:00:00Z",
679
+ * "updated_at": "2024-01-01T00:00:00Z",
680
+ * "email": "example@email.com"
681
+ * }
682
+ * ],
683
+ * created_at: '2024-01-01T00:00:00Z',
684
+ * updated_at: '2024-01-01T00:00:00Z',
685
+ * is_anonymous: false
686
+ * },
687
+ * provider_token: '<PROVIDER_TOKEN>',
688
+ * provider_refresh_token: '<PROVIDER_REFRESH_TOKEN>'
689
+ * },
690
+ * user: {
691
+ * id: '11111111-1111-1111-1111-111111111111',
692
+ * aud: 'authenticated',
693
+ * role: 'authenticated',
694
+ * email: 'example@email.com',
695
+ * email_confirmed_at: '2024-01-01T00:00:00Z',
696
+ * phone: '',
697
+ * confirmation_sent_at: '2024-01-01T00:00:00Z',
698
+ * confirmed_at: '2024-01-01T00:00:00Z',
699
+ * last_sign_in_at: '2024-01-01T00:00:00Z',
700
+ * app_metadata: {
701
+ * provider: 'email',
702
+ * providers: [
703
+ * "email",
704
+ * "<OTHER_PROVIDER>"
705
+ * ]
706
+ * },
707
+ * user_metadata: {
708
+ * email: 'email@email.com',
709
+ * email_verified: true,
710
+ * full_name: 'User Name',
711
+ * iss: '<ISS>',
712
+ * name: 'User Name',
713
+ * phone_verified: false,
714
+ * provider_id: '<PROVIDER_ID>',
715
+ * sub: '<SUB>'
716
+ * },
717
+ * identities: [
718
+ * {
719
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
720
+ * "id": "11111111-1111-1111-1111-111111111111",
721
+ * "user_id": "11111111-1111-1111-1111-111111111111",
722
+ * "identity_data": {
723
+ * "email": "example@email.com",
724
+ * "email_verified": false,
725
+ * "phone_verified": false,
726
+ * "sub": "11111111-1111-1111-1111-111111111111"
727
+ * },
728
+ * "provider": "email",
729
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
730
+ * "created_at": "2024-01-01T00:00:00Z",
731
+ * "updated_at": "2024-01-01T00:00:00Z",
732
+ * "email": "email@example.com"
733
+ * },
734
+ * {
735
+ * "identity_id": "33333333-3333-3333-3333-333333333333",
736
+ * "id": "<ID>",
737
+ * "user_id": "<USER_ID>",
738
+ * "identity_data": {
739
+ * "email": "example@email.com",
740
+ * "email_verified": true,
741
+ * "full_name": "User Name",
742
+ * "iss": "<ISS>",
743
+ * "name": "User Name",
744
+ * "phone_verified": false,
745
+ * "provider_id": "<PROVIDER_ID>",
746
+ * "sub": "<SUB>"
747
+ * },
748
+ * "provider": "<PROVIDER>",
749
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
750
+ * "created_at": "2024-01-01T00:00:00Z",
751
+ * "updated_at": "2024-01-01T00:00:00Z",
752
+ * "email": "example@email.com"
753
+ * }
754
+ * ],
755
+ * created_at: '2024-01-01T00:00:00Z',
756
+ * updated_at: '2024-01-01T00:00:00Z',
757
+ * is_anonymous: false
758
+ * },
759
+ * redirectType: null
760
+ * },
761
+ * "error": null
762
+ * }
763
+ * ```
764
+ */
765
+ exchangeCodeForSession(authCode: string): Promise<AuthTokenResponse>;
766
+ /**
767
+ * Signs in a user by verifying a message signed by the user's private key.
768
+ * Supports Ethereum (via Sign-In-With-Ethereum) & Solana (Sign-In-With-Solana) standards,
769
+ * both of which derive from the EIP-4361 standard
770
+ * With slight variation on Solana's side.
771
+ * @reference https://eips.ethereum.org/EIPS/eip-4361
772
+ *
773
+ * @category Auth
774
+ *
775
+ * @remarks
776
+ * - Uses a Web3 (Ethereum, Solana) wallet to sign a user in.
777
+ * - Read up on the [potential for abuse](/docs/guides/auth/auth-web3#potential-for-abuse) before using it.
778
+ *
779
+ * @example Sign in with Solana or Ethereum (Window API)
780
+ * ```js
781
+ * // uses window.ethereum for the wallet
782
+ * const { data, error } = await supabase.auth.signInWithWeb3({
783
+ * chain: 'ethereum',
784
+ * statement: 'I accept the Terms of Service at https://example.com/tos'
785
+ * })
786
+ *
787
+ * // uses window.solana for the wallet
788
+ * const { data, error } = await supabase.auth.signInWithWeb3({
789
+ * chain: 'solana',
790
+ * statement: 'I accept the Terms of Service at https://example.com/tos'
791
+ * })
792
+ * ```
793
+ *
794
+ * @example Sign in with Ethereum (Message and Signature)
795
+ * ```js
796
+ * const { data, error } = await supabase.auth.signInWithWeb3({
797
+ * chain: 'ethereum',
798
+ * message: '<sign in with ethereum message>',
799
+ * signature: '<hex of the ethereum signature over the message>',
800
+ * })
801
+ * ```
802
+ *
803
+ * @example Sign in with Solana (Brave)
804
+ * ```js
805
+ * const { data, error } = await supabase.auth.signInWithWeb3({
806
+ * chain: 'solana',
807
+ * statement: 'I accept the Terms of Service at https://example.com/tos',
808
+ * wallet: window.braveSolana
809
+ * })
810
+ * ```
811
+ *
812
+ * @example Sign in with Solana (Wallet Adapter)
813
+ * ```jsx
814
+ * function SignInButton() {
815
+ * const wallet = useWallet()
816
+ *
817
+ * return (
818
+ * <>
819
+ * {wallet.connected ? (
820
+ * <button
821
+ * onClick={() => {
822
+ * supabase.auth.signInWithWeb3({
823
+ * chain: 'solana',
824
+ * statement: 'I accept the Terms of Service at https://example.com/tos',
825
+ * wallet,
826
+ * })
827
+ * }}
828
+ * >
829
+ * Sign in with Solana
830
+ * </button>
831
+ * ) : (
832
+ * <WalletMultiButton />
833
+ * )}
834
+ * </>
835
+ * )
836
+ * }
837
+ *
838
+ * function App() {
839
+ * const endpoint = clusterApiUrl('devnet')
840
+ * const wallets = useMemo(() => [], [])
841
+ *
842
+ * return (
843
+ * <ConnectionProvider endpoint={endpoint}>
844
+ * <WalletProvider wallets={wallets}>
845
+ * <WalletModalProvider>
846
+ * <SignInButton />
847
+ * </WalletModalProvider>
848
+ * </WalletProvider>
849
+ * </ConnectionProvider>
850
+ * )
851
+ * }
852
+ * ```
853
+ */
854
+ signInWithWeb3(credentials: Web3Credentials): Promise<{
855
+ data: {
856
+ session: Session;
857
+ user: User;
858
+ };
859
+ error: null;
860
+ } | {
861
+ data: {
862
+ session: null;
863
+ user: null;
864
+ };
865
+ error: AuthError;
866
+ }>;
867
+ private signInWithEthereum;
868
+ private signInWithSolana;
869
+ private _exchangeCodeForSession;
870
+ /**
871
+ * Allows signing in with an OIDC ID token. The authentication provider used
872
+ * should be enabled and configured.
873
+ *
874
+ * @category Auth
875
+ *
876
+ * @remarks
877
+ * - Use an ID token to sign in.
878
+ * - Especially useful when implementing sign in using native platform dialogs in mobile or desktop apps using Sign in with Apple or Sign in with Google on iOS and Android.
879
+ * - You can also use Google's [One Tap](https://developers.google.com/identity/gsi/web/guides/display-google-one-tap) and [Automatic sign-in](https://developers.google.com/identity/gsi/web/guides/automatic-sign-in-sign-out) via this API.
880
+ *
881
+ * @example Sign In using ID Token
882
+ * ```js
883
+ * const { data, error } = await supabase.auth.signInWithIdToken({
884
+ * provider: 'google',
885
+ * token: 'your-id-token'
886
+ * })
887
+ * ```
888
+ *
889
+ * @exampleResponse Sign In using ID Token
890
+ * ```json
891
+ * {
892
+ * "data": {
893
+ * "user": {
894
+ * "id": "11111111-1111-1111-1111-111111111111",
895
+ * "aud": "authenticated",
896
+ * "role": "authenticated",
897
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
898
+ * "app_metadata": {
899
+ * ...
900
+ * },
901
+ * "user_metadata": {
902
+ * ...
903
+ * },
904
+ * "identities": [
905
+ * {
906
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
907
+ * "provider": "google",
908
+ * }
909
+ * ],
910
+ * "created_at": "2024-01-01T00:00:00Z",
911
+ * "updated_at": "2024-01-01T00:00:00Z",
912
+ * },
913
+ * "session": {
914
+ * "access_token": "<ACCESS_TOKEN>",
915
+ * "token_type": "bearer",
916
+ * "expires_in": 3600,
917
+ * "expires_at": 1700000000,
918
+ * "refresh_token": "<REFRESH_TOKEN>",
919
+ * "user": {
920
+ * "id": "11111111-1111-1111-1111-111111111111",
921
+ * "aud": "authenticated",
922
+ * "role": "authenticated",
923
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
924
+ * "app_metadata": {
925
+ * ...
926
+ * },
927
+ * "user_metadata": {
928
+ * ...
929
+ * },
930
+ * "identities": [
931
+ * {
932
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
933
+ * "provider": "google",
934
+ * }
935
+ * ],
936
+ * "created_at": "2024-01-01T00:00:00Z",
937
+ * "updated_at": "2024-01-01T00:00:00Z",
938
+ * }
939
+ * }
940
+ * },
941
+ * "error": null
942
+ * }
943
+ * ```
944
+ */
945
+ signInWithIdToken(credentials: SignInWithIdTokenCredentials): Promise<AuthTokenResponse>;
946
+ /**
947
+ * Log in a user using magiclink or a one-time password (OTP).
948
+ *
949
+ * If the `{{ .ConfirmationURL }}` variable is specified in the email template, a magiclink will be sent.
950
+ * If the `{{ .Token }}` variable is specified in the email template, an OTP will be sent.
951
+ * If you're using phone sign-ins, only an OTP will be sent. You won't be able to send a magiclink for phone sign-ins.
952
+ *
953
+ * Be aware that you may get back an error message that will not distinguish
954
+ * between the cases where the account does not exist or, that the account
955
+ * can only be accessed via social login.
956
+ *
957
+ * Do note that you will need to configure a Whatsapp sender on Twilio
958
+ * if you are using phone sign in with the 'whatsapp' channel. The whatsapp
959
+ * channel is not supported on other providers
960
+ * at this time.
961
+ * This method supports PKCE when an email is passed.
962
+ *
963
+ * @category Auth
964
+ *
965
+ * @remarks
966
+ * - Requires either an email or phone number.
967
+ * - This method is used for passwordless sign-ins where a OTP is sent to the user's email or phone number.
968
+ * - If the user doesn't exist, `signInWithOtp()` will signup the user instead. To restrict this behavior, you can set `shouldCreateUser` in `SignInWithPasswordlessCredentials.options` to `false`.
969
+ * - If you're using an email, you can configure whether you want the user to receive a magiclink or a OTP.
970
+ * - If you're using phone, you can configure whether you want the user to receive a OTP.
971
+ * - The magic link's destination URL is determined by the [`SITE_URL`](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls).
972
+ * - See [redirect URLs and wildcards](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls) to add additional redirect URLs to your project.
973
+ * - Magic links and OTPs share the same implementation. To send users a one-time code instead of a magic link, [modify the magic link email template](/dashboard/project/_/auth/templates) to include `{{ .Token }}` instead of `{{ .ConfirmationURL }}`.
974
+ * - See our [Twilio Phone Auth Guide](/docs/guides/auth/phone-login?showSMSProvider=Twilio) for details about configuring WhatsApp sign in.
975
+ *
976
+ * @exampleDescription Sign in with email
977
+ * The user will be sent an email which contains either a magiclink or a OTP or both. By default, a given user can only request a OTP once every 60 seconds.
978
+ *
979
+ * @example Sign in with email
980
+ * ```js
981
+ * const { data, error } = await supabase.auth.signInWithOtp({
982
+ * email: 'example@email.com',
983
+ * options: {
984
+ * emailRedirectTo: 'https://example.com/welcome'
985
+ * }
986
+ * })
987
+ * ```
988
+ *
989
+ * @exampleResponse Sign in with email
990
+ * ```json
991
+ * {
992
+ * "data": {
993
+ * "user": null,
994
+ * "session": null
995
+ * },
996
+ * "error": null
997
+ * }
998
+ * ```
999
+ *
1000
+ * @exampleDescription Sign in with SMS OTP
1001
+ * The user will be sent a SMS which contains a OTP. By default, a given user can only request a OTP once every 60 seconds.
1002
+ *
1003
+ * @example Sign in with SMS OTP
1004
+ * ```js
1005
+ * const { data, error } = await supabase.auth.signInWithOtp({
1006
+ * phone: '+13334445555',
1007
+ * })
1008
+ * ```
1009
+ *
1010
+ * @exampleDescription Sign in with WhatsApp OTP
1011
+ * The user will be sent a WhatsApp message which contains a OTP. By default, a given user can only request a OTP once every 60 seconds. Note that a user will need to have a valid WhatsApp account that is linked to Twilio in order to use this feature.
1012
+ *
1013
+ * @example Sign in with WhatsApp OTP
1014
+ * ```js
1015
+ * const { data, error } = await supabase.auth.signInWithOtp({
1016
+ * phone: '+13334445555',
1017
+ * options: {
1018
+ * channel:'whatsapp',
1019
+ * }
1020
+ * })
1021
+ * ```
1022
+ */
1023
+ signInWithOtp(credentials: SignInWithPasswordlessCredentials): Promise<AuthOtpResponse>;
1024
+ /**
1025
+ * Log in a user given a User supplied OTP or TokenHash received through mobile or email.
1026
+ *
1027
+ * @category Auth
1028
+ *
1029
+ * @remarks
1030
+ * - The `verifyOtp` method takes in different verification types.
1031
+ * - If a phone number is used, the type can either be:
1032
+ * 1. `sms` – Used when verifying a one-time password (OTP) sent via SMS during sign-up or sign-in.
1033
+ * 2. `phone_change` – Used when verifying an OTP sent to a new phone number during a phone number update process.
1034
+ * - If an email address is used, the type can be one of the following (note: `signup` and `magiclink` types are deprecated):
1035
+ * 1. `email` – Used when verifying an OTP sent to the user's email during sign-up or sign-in.
1036
+ * 2. `recovery` – Used when verifying an OTP sent for account recovery, typically after a password reset request.
1037
+ * 3. `invite` – Used when verifying an OTP sent as part of an invitation to join a project or organization.
1038
+ * 4. `email_change` – Used when verifying an OTP sent to a new email address during an email update process.
1039
+ * - The verification type used should be determined based on the corresponding auth method called before `verifyOtp` to sign up / sign-in a user.
1040
+ * - The `TokenHash` is contained in the [email templates](/docs/guides/auth/auth-email-templates) and can be used to sign in. You may wish to use the hash for the PKCE flow for Server Side Auth. Read [the Password-based Auth guide](/docs/guides/auth/passwords) for more details.
1041
+ *
1042
+ * @example Verify Signup One-Time Password (OTP)
1043
+ * ```js
1044
+ * const { data, error } = await supabase.auth.verifyOtp({ email, token, type: 'email'})
1045
+ * ```
1046
+ *
1047
+ * @exampleResponse Verify Signup One-Time Password (OTP)
1048
+ * ```json
1049
+ * {
1050
+ * "data": {
1051
+ * "user": {
1052
+ * "id": "11111111-1111-1111-1111-111111111111",
1053
+ * "aud": "authenticated",
1054
+ * "role": "authenticated",
1055
+ * "email": "example@email.com",
1056
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
1057
+ * "phone": "",
1058
+ * "confirmed_at": "2024-01-01T00:00:00Z",
1059
+ * "recovery_sent_at": "2024-01-01T00:00:00Z",
1060
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1061
+ * "app_metadata": {
1062
+ * "provider": "email",
1063
+ * "providers": [
1064
+ * "email"
1065
+ * ]
1066
+ * },
1067
+ * "user_metadata": {
1068
+ * "email": "example@email.com",
1069
+ * "email_verified": false,
1070
+ * "phone_verified": false,
1071
+ * "sub": "11111111-1111-1111-1111-111111111111"
1072
+ * },
1073
+ * "identities": [
1074
+ * {
1075
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
1076
+ * "id": "11111111-1111-1111-1111-111111111111",
1077
+ * "user_id": "11111111-1111-1111-1111-111111111111",
1078
+ * "identity_data": {
1079
+ * "email": "example@email.com",
1080
+ * "email_verified": false,
1081
+ * "phone_verified": false,
1082
+ * "sub": "11111111-1111-1111-1111-111111111111"
1083
+ * },
1084
+ * "provider": "email",
1085
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1086
+ * "created_at": "2024-01-01T00:00:00Z",
1087
+ * "updated_at": "2024-01-01T00:00:00Z",
1088
+ * "email": "example@email.com"
1089
+ * }
1090
+ * ],
1091
+ * "created_at": "2024-01-01T00:00:00Z",
1092
+ * "updated_at": "2024-01-01T00:00:00Z",
1093
+ * "is_anonymous": false
1094
+ * },
1095
+ * "session": {
1096
+ * "access_token": "<ACCESS_TOKEN>",
1097
+ * "token_type": "bearer",
1098
+ * "expires_in": 3600,
1099
+ * "expires_at": 1700000000,
1100
+ * "refresh_token": "<REFRESH_TOKEN>",
1101
+ * "user": {
1102
+ * "id": "11111111-1111-1111-1111-111111111111",
1103
+ * "aud": "authenticated",
1104
+ * "role": "authenticated",
1105
+ * "email": "example@email.com",
1106
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
1107
+ * "phone": "",
1108
+ * "confirmed_at": "2024-01-01T00:00:00Z",
1109
+ * "recovery_sent_at": "2024-01-01T00:00:00Z",
1110
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1111
+ * "app_metadata": {
1112
+ * "provider": "email",
1113
+ * "providers": [
1114
+ * "email"
1115
+ * ]
1116
+ * },
1117
+ * "user_metadata": {
1118
+ * "email": "example@email.com",
1119
+ * "email_verified": false,
1120
+ * "phone_verified": false,
1121
+ * "sub": "11111111-1111-1111-1111-111111111111"
1122
+ * },
1123
+ * "identities": [
1124
+ * {
1125
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
1126
+ * "id": "11111111-1111-1111-1111-111111111111",
1127
+ * "user_id": "11111111-1111-1111-1111-111111111111",
1128
+ * "identity_data": {
1129
+ * "email": "example@email.com",
1130
+ * "email_verified": false,
1131
+ * "phone_verified": false,
1132
+ * "sub": "11111111-1111-1111-1111-111111111111"
1133
+ * },
1134
+ * "provider": "email",
1135
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1136
+ * "created_at": "2024-01-01T00:00:00Z",
1137
+ * "updated_at": "2024-01-01T00:00:00Z",
1138
+ * "email": "example@email.com"
1139
+ * }
1140
+ * ],
1141
+ * "created_at": "2024-01-01T00:00:00Z",
1142
+ * "updated_at": "2024-01-01T00:00:00Z",
1143
+ * "is_anonymous": false
1144
+ * }
1145
+ * }
1146
+ * },
1147
+ * "error": null
1148
+ * }
1149
+ * ```
1150
+ *
1151
+ * @example Verify SMS One-Time Password (OTP)
1152
+ * ```js
1153
+ * const { data, error } = await supabase.auth.verifyOtp({ phone, token, type: 'sms'})
1154
+ * ```
1155
+ *
1156
+ * @example Verify Email Auth (Token Hash)
1157
+ * ```js
1158
+ * const { data, error } = await supabase.auth.verifyOtp({ token_hash: tokenHash, type: 'email'})
1159
+ * ```
1160
+ */
1161
+ verifyOtp(params: VerifyOtpParams): Promise<AuthResponse>;
1162
+ /**
1163
+ * Attempts a single-sign on using an enterprise Identity Provider. A
1164
+ * successful SSO attempt will redirect the current page to the identity
1165
+ * provider authorization page. The redirect URL is implementation and SSO
1166
+ * protocol specific.
1167
+ *
1168
+ * You can use it by providing a SSO domain. Typically you can extract this
1169
+ * domain by asking users for their email address. If this domain is
1170
+ * registered on the Auth instance the redirect will use that organization's
1171
+ * currently active SSO Identity Provider for the login.
1172
+ *
1173
+ * If you have built an organization-specific login page, you can use the
1174
+ * organization's SSO Identity Provider UUID directly instead.
1175
+ *
1176
+ * @category Auth
1177
+ *
1178
+ * @remarks
1179
+ * - Before you can call this method you need to [establish a connection](/docs/guides/auth/sso/auth-sso-saml#managing-saml-20-connections) to an identity provider. Use the [CLI commands](/docs/reference/cli/supabase-sso) to do this.
1180
+ * - If you've associated an email domain to the identity provider, you can use the `domain` property to start a sign-in flow.
1181
+ * - In case you need to use a different way to start the authentication flow with an identity provider, you can use the `providerId` property. For example:
1182
+ * - Mapping specific user email addresses with an identity provider.
1183
+ * - Using different hints to identity the identity provider to be used by the user, like a company-specific page, IP address or other tracking information.
1184
+ *
1185
+ * @example Sign in with email domain
1186
+ * ```js
1187
+ * // You can extract the user's email domain and use it to trigger the
1188
+ * // authentication flow with the correct identity provider.
1189
+ *
1190
+ * const { data, error } = await supabase.auth.signInWithSSO({
1191
+ * domain: 'company.com'
1192
+ * })
1193
+ *
1194
+ * if (data?.url) {
1195
+ * // redirect the user to the identity provider's authentication flow
1196
+ * window.location.href = data.url
1197
+ * }
1198
+ * ```
1199
+ *
1200
+ * @example Sign in with provider UUID
1201
+ * ```js
1202
+ * // Useful when you need to map a user's sign in request according
1203
+ * // to different rules that can't use email domains.
1204
+ *
1205
+ * const { data, error } = await supabase.auth.signInWithSSO({
1206
+ * providerId: '21648a9d-8d5a-4555-a9d1-d6375dc14e92'
1207
+ * })
1208
+ *
1209
+ * if (data?.url) {
1210
+ * // redirect the user to the identity provider's authentication flow
1211
+ * window.location.href = data.url
1212
+ * }
1213
+ * ```
1214
+ */
1215
+ signInWithSSO(params: SignInWithSSO): Promise<SSOResponse>;
1216
+ /**
1217
+ * Sends a reauthentication OTP to the user's email or phone number.
1218
+ * Requires the user to be signed-in.
1219
+ *
1220
+ * @category Auth
1221
+ *
1222
+ * @remarks
1223
+ * - This method is used together with `updateUser()` when a user's password needs to be updated.
1224
+ * - If you require your user to reauthenticate before updating their password, you need to enable the **Secure password change** option in your [project's email provider settings](/dashboard/project/_/auth/providers).
1225
+ * - A user is only require to reauthenticate before updating their password if **Secure password change** is enabled and the user **hasn't recently signed in**. A user is deemed recently signed in if the session was created in the last 24 hours.
1226
+ * - 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.
1227
+ * - After receiving the OTP, include it as the `nonce` in your `updateUser()` call to finalize the password change.
1228
+ *
1229
+ * @exampleDescription Send reauthentication nonce
1230
+ * Sends a reauthentication nonce to the user's email or phone number.
1231
+ *
1232
+ * @example Send reauthentication nonce
1233
+ * ```js
1234
+ * const { error } = await supabase.auth.reauthenticate()
1235
+ * ```
1236
+ */
1237
+ reauthenticate(): Promise<AuthResponse>;
1238
+ private _reauthenticate;
1239
+ /**
1240
+ * Resends an existing signup confirmation email, email change email, SMS OTP or phone change OTP.
1241
+ *
1242
+ * @category Auth
1243
+ *
1244
+ * @remarks
1245
+ * - Resends a signup confirmation, email change or phone change email to the user.
1246
+ * - Passwordless sign-ins can be resent by calling the `signInWithOtp()` method again.
1247
+ * - Password recovery emails can be resent by calling the `resetPasswordForEmail()` method again.
1248
+ * - 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(note: For existing users signing in with OTP, you should use `signInWithOtp()` again to resend the OTP).
1249
+ * - You can specify a redirect url when you resend an email link using the `emailRedirectTo` option.
1250
+ *
1251
+ * @exampleDescription Resend an email signup confirmation
1252
+ * Resends the email signup confirmation to the user
1253
+ *
1254
+ * @example Resend an email signup confirmation
1255
+ * ```js
1256
+ * const { error } = await supabase.auth.resend({
1257
+ * type: 'signup',
1258
+ * email: 'email@example.com',
1259
+ * options: {
1260
+ * emailRedirectTo: 'https://example.com/welcome'
1261
+ * }
1262
+ * })
1263
+ * ```
1264
+ *
1265
+ * @exampleDescription Resend a phone signup confirmation
1266
+ * Resends the phone signup confirmation email to the user
1267
+ *
1268
+ * @example Resend a phone signup confirmation
1269
+ * ```js
1270
+ * const { error } = await supabase.auth.resend({
1271
+ * type: 'sms',
1272
+ * phone: '1234567890'
1273
+ * })
1274
+ * ```
1275
+ *
1276
+ * @exampleDescription Resend email change email
1277
+ * Resends the email change email to the user
1278
+ *
1279
+ * @example Resend email change email
1280
+ * ```js
1281
+ * const { error } = await supabase.auth.resend({
1282
+ * type: 'email_change',
1283
+ * email: 'email@example.com'
1284
+ * })
1285
+ * ```
1286
+ *
1287
+ * @exampleDescription Resend phone change OTP
1288
+ * Resends the phone change OTP to the user
1289
+ *
1290
+ * @example Resend phone change OTP
1291
+ * ```js
1292
+ * const { error } = await supabase.auth.resend({
1293
+ * type: 'phone_change',
1294
+ * phone: '1234567890'
1295
+ * })
1296
+ * ```
1297
+ */
1298
+ resend(credentials: ResendParams): Promise<AuthOtpResponse>;
1299
+ /**
1300
+ * Returns the session, refreshing it if necessary.
1301
+ *
1302
+ * The session returned can be null if the session is not detected which can happen in the event a user is not signed-in or has logged out.
1303
+ *
1304
+ * **IMPORTANT:** This method loads values directly from the storage attached
1305
+ * to the client. If that storage is based on request cookies for example,
1306
+ * the values in it may not be authentic and therefore it's strongly advised
1307
+ * against using this method and its results in such circumstances. A warning
1308
+ * will be emitted if this is detected. Use {@link #getUser()} instead.
1309
+ *
1310
+ * @category Auth
1311
+ *
1312
+ * @remarks
1313
+ * - Since the introduction of [asymmetric JWT signing keys](/docs/guides/auth/signing-keys), this method is considered low-level and we encourage you to use `getClaims()` or `getUser()` instead.
1314
+ * - Retrieves the current [user session](/docs/guides/auth/sessions) from the storage medium (local storage, cookies).
1315
+ * - The session contains an access token (signed JWT), a refresh token and the user object.
1316
+ * - If the session's access token is expired or is about to expire, this method will use the refresh token to refresh the session.
1317
+ * - When using in a browser, or you've called `startAutoRefresh()` in your environment (React Native, etc.) this function always returns a valid access token without refreshing the session itself, as this is done in the background. This function returns very fast.
1318
+ * - **IMPORTANT SECURITY NOTICE:** If using an insecure storage medium, such as cookies or request headers, the user object returned by this function **must not be trusted**. Always verify the JWT using `getClaims()` or your own JWT verification library to securely establish the user's identity and access. You can also use `getUser()` to fetch the user object directly from the Auth server for this purpose.
1319
+ * - When using in a browser, this function is synchronized across all tabs using the [LockManager](https://developer.mozilla.org/en-US/docs/Web/API/LockManager) API. In other environments make sure you've defined a proper `lock` property, if necessary, to make sure there are no race conditions while the session is being refreshed.
1320
+ *
1321
+ * @example Get the session data
1322
+ * ```js
1323
+ * const { data, error } = await supabase.auth.getSession()
1324
+ * ```
1325
+ *
1326
+ * @exampleResponse Get the session data
1327
+ * ```json
1328
+ * {
1329
+ * "data": {
1330
+ * "session": {
1331
+ * "access_token": "<ACCESS_TOKEN>",
1332
+ * "token_type": "bearer",
1333
+ * "expires_in": 3600,
1334
+ * "expires_at": 1700000000,
1335
+ * "refresh_token": "<REFRESH_TOKEN>",
1336
+ * "user": {
1337
+ * "id": "11111111-1111-1111-1111-111111111111",
1338
+ * "aud": "authenticated",
1339
+ * "role": "authenticated",
1340
+ * "email": "example@email.com",
1341
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
1342
+ * "phone": "",
1343
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1344
+ * "app_metadata": {
1345
+ * "provider": "email",
1346
+ * "providers": [
1347
+ * "email"
1348
+ * ]
1349
+ * },
1350
+ * "user_metadata": {
1351
+ * "email": "example@email.com",
1352
+ * "email_verified": false,
1353
+ * "phone_verified": false,
1354
+ * "sub": "11111111-1111-1111-1111-111111111111"
1355
+ * },
1356
+ * "identities": [
1357
+ * {
1358
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
1359
+ * "id": "11111111-1111-1111-1111-111111111111",
1360
+ * "user_id": "11111111-1111-1111-1111-111111111111",
1361
+ * "identity_data": {
1362
+ * "email": "example@email.com",
1363
+ * "email_verified": false,
1364
+ * "phone_verified": false,
1365
+ * "sub": "11111111-1111-1111-1111-111111111111"
1366
+ * },
1367
+ * "provider": "email",
1368
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1369
+ * "created_at": "2024-01-01T00:00:00Z",
1370
+ * "updated_at": "2024-01-01T00:00:00Z",
1371
+ * "email": "example@email.com"
1372
+ * }
1373
+ * ],
1374
+ * "created_at": "2024-01-01T00:00:00Z",
1375
+ * "updated_at": "2024-01-01T00:00:00Z",
1376
+ * "is_anonymous": false
1377
+ * }
1378
+ * }
1379
+ * },
1380
+ * "error": null
1381
+ * }
1382
+ * ```
1383
+ */
1384
+ getSession(): Promise<{
1385
+ data: {
1386
+ session: Session;
1387
+ };
1388
+ error: null;
1389
+ } | {
1390
+ data: {
1391
+ session: null;
1392
+ };
1393
+ error: AuthError;
1394
+ } | {
1395
+ data: {
1396
+ session: null;
1397
+ };
1398
+ error: null;
1399
+ }>;
1400
+ /**
1401
+ * Acquires a global lock based on the storage key.
1402
+ */
1403
+ private _acquireLock;
1404
+ /**
1405
+ * Use instead of {@link #getSession} inside the library. It is
1406
+ * semantically usually what you want, as getting a session involves some
1407
+ * processing afterwards that requires only one client operating on the
1408
+ * session at once across multiple tabs or processes.
1409
+ */
1410
+ private _useSession;
1411
+ /**
1412
+ * NEVER USE DIRECTLY!
1413
+ *
1414
+ * Always use {@link #_useSession}.
1415
+ */
1416
+ private __loadSession;
1417
+ /**
1418
+ * Gets the current user details if there is an existing session. This method
1419
+ * performs a network request to the Supabase Auth server, so the returned
1420
+ * value is authentic and can be used to base authorization rules on.
1421
+ *
1422
+ * @param jwt Takes in an optional access token JWT. If no JWT is provided, the JWT from the current session is used.
1423
+ *
1424
+ * @category Auth
1425
+ *
1426
+ * @remarks
1427
+ * - This method fetches the user object from the database instead of local session.
1428
+ * - This method is useful for checking if the user is authorized because it validates the user's access token JWT on the server.
1429
+ * - Should always be used when checking for user authorization on the server. On the client, you can instead use `getSession().session.user` for faster results. `getSession` is insecure on the server.
1430
+ *
1431
+ * @example Get the logged in user with the current existing session
1432
+ * ```js
1433
+ * const { data: { user } } = await supabase.auth.getUser()
1434
+ * ```
1435
+ *
1436
+ * @exampleResponse Get the logged in user with the current existing session
1437
+ * ```json
1438
+ * {
1439
+ * "data": {
1440
+ * "user": {
1441
+ * "id": "11111111-1111-1111-1111-111111111111",
1442
+ * "aud": "authenticated",
1443
+ * "role": "authenticated",
1444
+ * "email": "example@email.com",
1445
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
1446
+ * "phone": "",
1447
+ * "confirmed_at": "2024-01-01T00:00:00Z",
1448
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1449
+ * "app_metadata": {
1450
+ * "provider": "email",
1451
+ * "providers": [
1452
+ * "email"
1453
+ * ]
1454
+ * },
1455
+ * "user_metadata": {
1456
+ * "email": "example@email.com",
1457
+ * "email_verified": false,
1458
+ * "phone_verified": false,
1459
+ * "sub": "11111111-1111-1111-1111-111111111111"
1460
+ * },
1461
+ * "identities": [
1462
+ * {
1463
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
1464
+ * "id": "11111111-1111-1111-1111-111111111111",
1465
+ * "user_id": "11111111-1111-1111-1111-111111111111",
1466
+ * "identity_data": {
1467
+ * "email": "example@email.com",
1468
+ * "email_verified": false,
1469
+ * "phone_verified": false,
1470
+ * "sub": "11111111-1111-1111-1111-111111111111"
1471
+ * },
1472
+ * "provider": "email",
1473
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1474
+ * "created_at": "2024-01-01T00:00:00Z",
1475
+ * "updated_at": "2024-01-01T00:00:00Z",
1476
+ * "email": "example@email.com"
1477
+ * }
1478
+ * ],
1479
+ * "created_at": "2024-01-01T00:00:00Z",
1480
+ * "updated_at": "2024-01-01T00:00:00Z",
1481
+ * "is_anonymous": false
1482
+ * }
1483
+ * },
1484
+ * "error": null
1485
+ * }
1486
+ * ```
1487
+ *
1488
+ * @example Get the logged in user with a custom access token jwt
1489
+ * ```js
1490
+ * const { data: { user } } = await supabase.auth.getUser(jwt)
1491
+ * ```
1492
+ */
1493
+ getUser(jwt?: string): Promise<UserResponse>;
1494
+ private _getUser;
1495
+ /**
1496
+ * Updates user data for a logged in user.
1497
+ *
1498
+ * @category Auth
1499
+ *
1500
+ * @remarks
1501
+ * - In order to use the `updateUser()` method, the user needs to be signed in first.
1502
+ * - By default, email updates sends a confirmation link to both the user's current and new email.
1503
+ * To only send a confirmation link to the user's new email, disable **Secure email change** in your project's [email auth provider settings](/dashboard/project/_/auth/providers).
1504
+ *
1505
+ * @exampleDescription Update the email for an authenticated user
1506
+ * Sends a "Confirm Email Change" email to the new address. If **Secure Email Change** is enabled (default), confirmation is also required from the **old email** before the change is applied. To skip dual confirmation and apply the change after only the new email is verified, disable **Secure Email Change** in the [Email Auth Provider settings](/dashboard/project/_/auth/providers?provider=Email).
1507
+ *
1508
+ * @example Update the email for an authenticated user
1509
+ * ```js
1510
+ * const { data, error } = await supabase.auth.updateUser({
1511
+ * email: 'new@email.com'
1512
+ * })
1513
+ * ```
1514
+ *
1515
+ * @exampleResponse Update the email for an authenticated user
1516
+ * ```json
1517
+ * {
1518
+ * "data": {
1519
+ * "user": {
1520
+ * "id": "11111111-1111-1111-1111-111111111111",
1521
+ * "aud": "authenticated",
1522
+ * "role": "authenticated",
1523
+ * "email": "example@email.com",
1524
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
1525
+ * "phone": "",
1526
+ * "confirmed_at": "2024-01-01T00:00:00Z",
1527
+ * "new_email": "new@email.com",
1528
+ * "email_change_sent_at": "2024-01-01T00:00:00Z",
1529
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1530
+ * "app_metadata": {
1531
+ * "provider": "email",
1532
+ * "providers": [
1533
+ * "email"
1534
+ * ]
1535
+ * },
1536
+ * "user_metadata": {
1537
+ * "email": "example@email.com",
1538
+ * "email_verified": false,
1539
+ * "phone_verified": false,
1540
+ * "sub": "11111111-1111-1111-1111-111111111111"
1541
+ * },
1542
+ * "identities": [
1543
+ * {
1544
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
1545
+ * "id": "11111111-1111-1111-1111-111111111111",
1546
+ * "user_id": "11111111-1111-1111-1111-111111111111",
1547
+ * "identity_data": {
1548
+ * "email": "example@email.com",
1549
+ * "email_verified": false,
1550
+ * "phone_verified": false,
1551
+ * "sub": "11111111-1111-1111-1111-111111111111"
1552
+ * },
1553
+ * "provider": "email",
1554
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1555
+ * "created_at": "2024-01-01T00:00:00Z",
1556
+ * "updated_at": "2024-01-01T00:00:00Z",
1557
+ * "email": "example@email.com"
1558
+ * }
1559
+ * ],
1560
+ * "created_at": "2024-01-01T00:00:00Z",
1561
+ * "updated_at": "2024-01-01T00:00:00Z",
1562
+ * "is_anonymous": false
1563
+ * }
1564
+ * },
1565
+ * "error": null
1566
+ * }
1567
+ * ```
1568
+ *
1569
+ * @exampleDescription Update the phone number for an authenticated user
1570
+ * Sends a one-time password (OTP) to the new phone number.
1571
+ *
1572
+ * @example Update the phone number for an authenticated user
1573
+ * ```js
1574
+ * const { data, error } = await supabase.auth.updateUser({
1575
+ * phone: '123456789'
1576
+ * })
1577
+ * ```
1578
+ *
1579
+ * @example Update the password for an authenticated user
1580
+ * ```js
1581
+ * const { data, error } = await supabase.auth.updateUser({
1582
+ * password: 'new password'
1583
+ * })
1584
+ * ```
1585
+ *
1586
+ * @exampleDescription Update the user's metadata
1587
+ * Updates the user's custom metadata.
1588
+ *
1589
+ * **Note**: The `data` field maps to the `auth.users.raw_user_meta_data` column in your Supabase database. When calling `getUser()`, the data will be available as `user.user_metadata`.
1590
+ *
1591
+ * @example Update the user's metadata
1592
+ * ```js
1593
+ * const { data, error } = await supabase.auth.updateUser({
1594
+ * data: { hello: 'world' }
1595
+ * })
1596
+ * ```
1597
+ *
1598
+ * @exampleDescription Update the user's password with a nonce
1599
+ * If **Secure password change** is enabled in your [project's email provider settings](/dashboard/project/_/auth/providers), updating the user's password would require a nonce if the user **hasn't recently signed in**. The nonce is sent to the user's email or phone number. A user is deemed recently signed in if the session was created in the last 24 hours.
1600
+ *
1601
+ * @example Update the user's password with a nonce
1602
+ * ```js
1603
+ * const { data, error } = await supabase.auth.updateUser({
1604
+ * password: 'new password',
1605
+ * nonce: '123456'
1606
+ * })
1607
+ * ```
1608
+ */
1609
+ updateUser(attributes: UserAttributes, options?: {
1610
+ emailRedirectTo?: string | undefined;
1611
+ }): Promise<UserResponse>;
1612
+ protected _updateUser(attributes: UserAttributes, options?: {
1613
+ emailRedirectTo?: string | undefined;
1614
+ }): Promise<UserResponse>;
1615
+ /**
1616
+ * Sets the session data from the current session. If the current session is expired, setSession will take care of refreshing it to obtain a new session.
1617
+ * If the refresh token or access token in the current session is invalid, an error will be thrown.
1618
+ * @param currentSession The current session that minimally contains an access token and refresh token.
1619
+ *
1620
+ * @category Auth
1621
+ *
1622
+ * @remarks
1623
+ * - This method sets the session using an `access_token` and `refresh_token`.
1624
+ * - If successful, a `SIGNED_IN` event is emitted.
1625
+ *
1626
+ * @exampleDescription Set the session
1627
+ * Sets the session data from an access_token and refresh_token, then returns an auth response or error.
1628
+ *
1629
+ * @example Set the session
1630
+ * ```js
1631
+ * const { data, error } = await supabase.auth.setSession({
1632
+ * access_token,
1633
+ * refresh_token
1634
+ * })
1635
+ * ```
1636
+ *
1637
+ * @exampleResponse Set the session
1638
+ * ```json
1639
+ * {
1640
+ * "data": {
1641
+ * "user": {
1642
+ * "id": "11111111-1111-1111-1111-111111111111",
1643
+ * "aud": "authenticated",
1644
+ * "role": "authenticated",
1645
+ * "email": "example@email.com",
1646
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
1647
+ * "phone": "",
1648
+ * "confirmed_at": "2024-01-01T00:00:00Z",
1649
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1650
+ * "app_metadata": {
1651
+ * "provider": "email",
1652
+ * "providers": [
1653
+ * "email"
1654
+ * ]
1655
+ * },
1656
+ * "user_metadata": {
1657
+ * "email": "example@email.com",
1658
+ * "email_verified": false,
1659
+ * "phone_verified": false,
1660
+ * "sub": "11111111-1111-1111-1111-111111111111"
1661
+ * },
1662
+ * "identities": [
1663
+ * {
1664
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
1665
+ * "id": "11111111-1111-1111-1111-111111111111",
1666
+ * "user_id": "11111111-1111-1111-1111-111111111111",
1667
+ * "identity_data": {
1668
+ * "email": "example@email.com",
1669
+ * "email_verified": false,
1670
+ * "phone_verified": false,
1671
+ * "sub": "11111111-1111-1111-1111-111111111111"
1672
+ * },
1673
+ * "provider": "email",
1674
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1675
+ * "created_at": "2024-01-01T00:00:00Z",
1676
+ * "updated_at": "2024-01-01T00:00:00Z",
1677
+ * "email": "example@email.com"
1678
+ * }
1679
+ * ],
1680
+ * "created_at": "2024-01-01T00:00:00Z",
1681
+ * "updated_at": "2024-01-01T00:00:00Z",
1682
+ * "is_anonymous": false
1683
+ * },
1684
+ * "session": {
1685
+ * "access_token": "<ACCESS_TOKEN>",
1686
+ * "refresh_token": "<REFRESH_TOKEN>",
1687
+ * "user": {
1688
+ * "id": "11111111-1111-1111-1111-111111111111",
1689
+ * "aud": "authenticated",
1690
+ * "role": "authenticated",
1691
+ * "email": "example@email.com",
1692
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
1693
+ * "phone": "",
1694
+ * "confirmed_at": "2024-01-01T00:00:00Z",
1695
+ * "last_sign_in_at": "11111111-1111-1111-1111-111111111111",
1696
+ * "app_metadata": {
1697
+ * "provider": "email",
1698
+ * "providers": [
1699
+ * "email"
1700
+ * ]
1701
+ * },
1702
+ * "user_metadata": {
1703
+ * "email": "example@email.com",
1704
+ * "email_verified": false,
1705
+ * "phone_verified": false,
1706
+ * "sub": "11111111-1111-1111-1111-111111111111"
1707
+ * },
1708
+ * "identities": [
1709
+ * {
1710
+ * "identity_id": "2024-01-01T00:00:00Z",
1711
+ * "id": "11111111-1111-1111-1111-111111111111",
1712
+ * "user_id": "11111111-1111-1111-1111-111111111111",
1713
+ * "identity_data": {
1714
+ * "email": "example@email.com",
1715
+ * "email_verified": false,
1716
+ * "phone_verified": false,
1717
+ * "sub": "11111111-1111-1111-1111-111111111111"
1718
+ * },
1719
+ * "provider": "email",
1720
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1721
+ * "created_at": "2024-01-01T00:00:00Z",
1722
+ * "updated_at": "2024-01-01T00:00:00Z",
1723
+ * "email": "example@email.com"
1724
+ * }
1725
+ * ],
1726
+ * "created_at": "2024-01-01T00:00:00Z",
1727
+ * "updated_at": "2024-01-01T00:00:00Z",
1728
+ * "is_anonymous": false
1729
+ * },
1730
+ * "token_type": "bearer",
1731
+ * "expires_in": 3500,
1732
+ * "expires_at": 1700000000
1733
+ * }
1734
+ * },
1735
+ * "error": null
1736
+ * }
1737
+ * ```
1738
+ */
1739
+ setSession(currentSession: {
1740
+ access_token: string;
1741
+ refresh_token: string;
1742
+ }): Promise<AuthResponse>;
1743
+ protected _setSession(currentSession: {
1744
+ access_token: string;
1745
+ refresh_token: string;
1746
+ }): Promise<AuthResponse>;
1747
+ /**
1748
+ * Returns a new session, regardless of expiry status.
1749
+ * Takes in an optional current session. If not passed in, then refreshSession() will attempt to retrieve it from getSession().
1750
+ * If the current session's refresh token is invalid, an error will be thrown.
1751
+ * @param currentSession The current session. If passed in, it must contain a refresh token.
1752
+ *
1753
+ * @category Auth
1754
+ *
1755
+ * @remarks
1756
+ * - This method will refresh and return a new session whether the current one is expired or not.
1757
+ *
1758
+ * @example Refresh session using the current session
1759
+ * ```js
1760
+ * const { data, error } = await supabase.auth.refreshSession()
1761
+ * const { session, user } = data
1762
+ * ```
1763
+ *
1764
+ * @exampleResponse Refresh session using the current session
1765
+ * ```json
1766
+ * {
1767
+ * "data": {
1768
+ * "user": {
1769
+ * "id": "11111111-1111-1111-1111-111111111111",
1770
+ * "aud": "authenticated",
1771
+ * "role": "authenticated",
1772
+ * "email": "example@email.com",
1773
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
1774
+ * "phone": "",
1775
+ * "confirmed_at": "2024-01-01T00:00:00Z",
1776
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1777
+ * "app_metadata": {
1778
+ * "provider": "email",
1779
+ * "providers": [
1780
+ * "email"
1781
+ * ]
1782
+ * },
1783
+ * "user_metadata": {
1784
+ * "email": "example@email.com",
1785
+ * "email_verified": false,
1786
+ * "phone_verified": false,
1787
+ * "sub": "11111111-1111-1111-1111-111111111111"
1788
+ * },
1789
+ * "identities": [
1790
+ * {
1791
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
1792
+ * "id": "11111111-1111-1111-1111-111111111111",
1793
+ * "user_id": "11111111-1111-1111-1111-111111111111",
1794
+ * "identity_data": {
1795
+ * "email": "example@email.com",
1796
+ * "email_verified": false,
1797
+ * "phone_verified": false,
1798
+ * "sub": "11111111-1111-1111-1111-111111111111"
1799
+ * },
1800
+ * "provider": "email",
1801
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1802
+ * "created_at": "2024-01-01T00:00:00Z",
1803
+ * "updated_at": "2024-01-01T00:00:00Z",
1804
+ * "email": "example@email.com"
1805
+ * }
1806
+ * ],
1807
+ * "created_at": "2024-01-01T00:00:00Z",
1808
+ * "updated_at": "2024-01-01T00:00:00Z",
1809
+ * "is_anonymous": false
1810
+ * },
1811
+ * "session": {
1812
+ * "access_token": "<ACCESS_TOKEN>",
1813
+ * "token_type": "bearer",
1814
+ * "expires_in": 3600,
1815
+ * "expires_at": 1700000000,
1816
+ * "refresh_token": "<REFRESH_TOKEN>",
1817
+ * "user": {
1818
+ * "id": "11111111-1111-1111-1111-111111111111",
1819
+ * "aud": "authenticated",
1820
+ * "role": "authenticated",
1821
+ * "email": "example@email.com",
1822
+ * "email_confirmed_at": "2024-01-01T00:00:00Z",
1823
+ * "phone": "",
1824
+ * "confirmed_at": "2024-01-01T00:00:00Z",
1825
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1826
+ * "app_metadata": {
1827
+ * "provider": "email",
1828
+ * "providers": [
1829
+ * "email"
1830
+ * ]
1831
+ * },
1832
+ * "user_metadata": {
1833
+ * "email": "example@email.com",
1834
+ * "email_verified": false,
1835
+ * "phone_verified": false,
1836
+ * "sub": "11111111-1111-1111-1111-111111111111"
1837
+ * },
1838
+ * "identities": [
1839
+ * {
1840
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
1841
+ * "id": "11111111-1111-1111-1111-111111111111",
1842
+ * "user_id": "11111111-1111-1111-1111-111111111111",
1843
+ * "identity_data": {
1844
+ * "email": "example@email.com",
1845
+ * "email_verified": false,
1846
+ * "phone_verified": false,
1847
+ * "sub": "11111111-1111-1111-1111-111111111111"
1848
+ * },
1849
+ * "provider": "email",
1850
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
1851
+ * "created_at": "2024-01-01T00:00:00Z",
1852
+ * "updated_at": "2024-01-01T00:00:00Z",
1853
+ * "email": "example@email.com"
1854
+ * }
1855
+ * ],
1856
+ * "created_at": "2024-01-01T00:00:00Z",
1857
+ * "updated_at": "2024-01-01T00:00:00Z",
1858
+ * "is_anonymous": false
1859
+ * }
1860
+ * }
1861
+ * },
1862
+ * "error": null
1863
+ * }
1864
+ * ```
1865
+ *
1866
+ * @example Refresh session using a refresh token
1867
+ * ```js
1868
+ * const { data, error } = await supabase.auth.refreshSession({ refresh_token })
1869
+ * const { session, user } = data
1870
+ * ```
1871
+ */
1872
+ refreshSession(currentSession?: {
1873
+ refresh_token: string;
1874
+ }): Promise<AuthResponse>;
1875
+ protected _refreshSession(currentSession?: {
1876
+ refresh_token: string;
1877
+ }): Promise<AuthResponse>;
1878
+ /**
1879
+ * Gets the session data from a URL string
1880
+ */
1881
+ private _getSessionFromURL;
1882
+ /**
1883
+ * Checks if the current URL contains parameters given by an implicit oauth grant flow (https://www.rfc-editor.org/rfc/rfc6749.html#section-4.2)
1884
+ *
1885
+ * If `detectSessionInUrl` is a function, it will be called with the URL and params to determine
1886
+ * if the URL should be processed as a Supabase auth callback. This allows users to exclude
1887
+ * URLs from other OAuth providers (e.g., Facebook Login) that also return access_token in the fragment.
1888
+ */
1889
+ private _isImplicitGrantCallback;
1890
+ /**
1891
+ * Checks if the current URL and backing storage contain parameters given by a PKCE flow
1892
+ */
1893
+ private _isPKCECallback;
1894
+ /**
1895
+ * Inside a browser context, `signOut()` will remove the logged in user from the browser session and log them out - removing all items from localstorage and then trigger a `"SIGNED_OUT"` event.
1896
+ *
1897
+ * For server-side management, you can revoke all refresh tokens for a user by passing a user's JWT through to `auth.api.signOut(JWT: string)`.
1898
+ * There is no way to revoke a user's access token jwt until it expires. It is recommended to set a shorter expiry on the jwt for this reason.
1899
+ *
1900
+ * If using `others` scope, no `SIGNED_OUT` event is fired!
1901
+ *
1902
+ * **Warning:** the default `scope` is `'global'`. This signs the user out of
1903
+ * **every device they are currently signed in on**, not just the current
1904
+ * tab/session. If you only want to sign the user out of the current session
1905
+ * (the behavior most other auth libraries default to), pass
1906
+ * `{ scope: 'local' }` explicitly.
1907
+ *
1908
+ * @category Auth
1909
+ *
1910
+ * @remarks
1911
+ * - In order to use the `signOut()` method, the user needs to be signed in first.
1912
+ * - By default, `signOut()` uses the **global** scope, which signs out the user
1913
+ * on every device they are signed in on (not just the current one). Pass
1914
+ * `{ scope: 'local' }` to only sign out the current session. This is
1915
+ * usually what apps want on a "Sign out" button, especially when users
1916
+ * sign in from multiple devices and do not expect signing out of one to
1917
+ * terminate the others.
1918
+ * - Since Supabase Auth uses JWTs for authentication, the access token JWT will be valid until it's expired. When the user signs out, Supabase revokes the refresh token and deletes the JWT from the client-side. This does not revoke the JWT and it will still be valid until it expires.
1919
+ *
1920
+ * @example Sign out of every device (global – default)
1921
+ * ```js
1922
+ * const { error } = await supabase.auth.signOut()
1923
+ * ```
1924
+ *
1925
+ * @example Sign out only the current session (recommended for most apps)
1926
+ * ```js
1927
+ * const { error } = await supabase.auth.signOut({ scope: 'local' })
1928
+ * ```
1929
+ *
1930
+ * @example Sign out of all other sessions, keep the current one
1931
+ * ```js
1932
+ * const { error } = await supabase.auth.signOut({ scope: 'others' })
1933
+ * ```
1934
+ */
1935
+ signOut(options?: SignOut): Promise<{
1936
+ error: AuthError | null;
1937
+ }>;
1938
+ protected _signOut({ scope }?: SignOut): Promise<{
1939
+ error: AuthError | null;
1940
+ }>;
1941
+ /**
1942
+ * Receive a notification every time an auth event happens.
1943
+ * Safe to use without an async function as callback.
1944
+ *
1945
+ * @param callback A callback function to be invoked when an auth event happens.
1946
+ */
1947
+ onAuthStateChange(callback: (event: AuthChangeEvent, session: Session | null) => void): {
1948
+ data: {
1949
+ subscription: Subscription;
1950
+ };
1951
+ };
1952
+ /**
1953
+ * Avoid using an async function inside `onAuthStateChange` as you might end
1954
+ * up with a deadlock. The callback function runs inside an exclusive lock,
1955
+ * so calling other Supabase Client APIs that also try to acquire the
1956
+ * exclusive lock, might cause a deadlock. This behavior is observable across
1957
+ * tabs. In the next major library version, this behavior will not be supported.
1958
+ *
1959
+ * Receive a notification every time an auth event happens.
1960
+ *
1961
+ * @param callback A callback function to be invoked when an auth event happens.
1962
+ * @deprecated Due to the possibility of deadlocks with async functions as callbacks, use the version without an async function.
1963
+ */
1964
+ onAuthStateChange(callback: (event: AuthChangeEvent, session: Session | null) => Promise<void>): {
1965
+ data: {
1966
+ subscription: Subscription;
1967
+ };
1968
+ };
1969
+ private _emitInitialSession;
1970
+ /**
1971
+ * Sends a password reset request to an email address. This method supports the PKCE flow.
1972
+ *
1973
+ * @param email The email address of the user.
1974
+ * @param options.redirectTo The URL to send the user to after they click the password reset link.
1975
+ * @param options.captchaToken Verification token received when the user completes the captcha on the site.
1976
+ *
1977
+ * @category Auth
1978
+ *
1979
+ * @remarks
1980
+ * - The password reset flow consist of 2 broad steps: (i) Allow the user to login via the password reset link; (ii) Update the user's password.
1981
+ * - The `resetPasswordForEmail()` only sends a password reset link to the user's email.
1982
+ * To update the user's password, see [`updateUser()`](/docs/reference/javascript/auth-updateuser).
1983
+ * - A `PASSWORD_RECOVERY` event will be emitted when the password recovery link is clicked.
1984
+ * You can use [`onAuthStateChange()`](/docs/reference/javascript/auth-onauthstatechange) to listen and invoke a callback function on these events.
1985
+ * - When the user clicks the reset link in the email they are redirected back to your application.
1986
+ * You can configure the URL that the user is redirected to with the `redirectTo` parameter.
1987
+ * See [redirect URLs and wildcards](/docs/guides/auth/redirect-urls#use-wildcards-in-redirect-urls) to add additional redirect URLs to your project.
1988
+ * - After the user has been redirected successfully, prompt them for a new password and call `updateUser()`:
1989
+ * ```js
1990
+ * const { data, error } = await supabase.auth.updateUser({
1991
+ * password: new_password
1992
+ * })
1993
+ * ```
1994
+ *
1995
+ * @example Reset password
1996
+ * ```js
1997
+ * const { data, error } = await supabase.auth.resetPasswordForEmail(email, {
1998
+ * redirectTo: 'https://example.com/update-password',
1999
+ * })
2000
+ * ```
2001
+ *
2002
+ * @exampleResponse Reset password
2003
+ * ```json
2004
+ * {
2005
+ * data: {}
2006
+ * error: null
2007
+ * }
2008
+ * ```
2009
+ *
2010
+ * @example Reset password (React)
2011
+ * ```js
2012
+ * /**
2013
+ * * Step 1: Send the user an email to get a password reset token.
2014
+ * * This email contains a link which sends the user back to your application.
2015
+ * *\/
2016
+ * const { data, error } = await supabase.auth
2017
+ * .resetPasswordForEmail('user@email.com')
2018
+ *
2019
+ * /**
2020
+ * * Step 2: Once the user is redirected back to your application,
2021
+ * * ask the user to reset their password.
2022
+ * *\/
2023
+ * useEffect(() => {
2024
+ * supabase.auth.onAuthStateChange(async (event, session) => {
2025
+ * if (event == "PASSWORD_RECOVERY") {
2026
+ * const newPassword = prompt("What would you like your new password to be?");
2027
+ * const { data, error } = await supabase.auth
2028
+ * .updateUser({ password: newPassword })
2029
+ *
2030
+ * if (data) alert("Password updated successfully!")
2031
+ * if (error) alert("There was an error updating your password.")
2032
+ * }
2033
+ * })
2034
+ * }, [])
2035
+ * ```
2036
+ */
2037
+ resetPasswordForEmail(email: string, options?: {
2038
+ redirectTo?: string;
2039
+ captchaToken?: string;
2040
+ }): Promise<{
2041
+ data: {};
2042
+ error: null;
2043
+ } | {
2044
+ data: null;
2045
+ error: AuthError;
2046
+ }>;
2047
+ /**
2048
+ * Gets all the identities linked to a user.
2049
+ *
2050
+ * @category Auth
2051
+ *
2052
+ * @remarks
2053
+ * - The user needs to be signed in to call `getUserIdentities()`.
2054
+ *
2055
+ * @example Returns a list of identities linked to the user
2056
+ * ```js
2057
+ * const { data, error } = await supabase.auth.getUserIdentities()
2058
+ * ```
2059
+ *
2060
+ * @exampleResponse Returns a list of identities linked to the user
2061
+ * ```json
2062
+ * {
2063
+ * "data": {
2064
+ * "identities": [
2065
+ * {
2066
+ * "identity_id": "22222222-2222-2222-2222-222222222222",
2067
+ * "id": "2024-01-01T00:00:00Z",
2068
+ * "user_id": "2024-01-01T00:00:00Z",
2069
+ * "identity_data": {
2070
+ * "email": "example@email.com",
2071
+ * "email_verified": false,
2072
+ * "phone_verified": false,
2073
+ * "sub": "11111111-1111-1111-1111-111111111111"
2074
+ * },
2075
+ * "provider": "email",
2076
+ * "last_sign_in_at": "2024-01-01T00:00:00Z",
2077
+ * "created_at": "2024-01-01T00:00:00Z",
2078
+ * "updated_at": "2024-01-01T00:00:00Z",
2079
+ * "email": "example@email.com"
2080
+ * }
2081
+ * ]
2082
+ * },
2083
+ * "error": null
2084
+ * }
2085
+ * ```
2086
+ */
2087
+ getUserIdentities(): Promise<{
2088
+ data: {
2089
+ identities: UserIdentity[];
2090
+ };
2091
+ error: null;
2092
+ } | {
2093
+ data: null;
2094
+ error: AuthError;
2095
+ }>;
2096
+ /**
2097
+ * Links an oauth identity to an existing user.
2098
+ * This method supports the PKCE flow.
2099
+ */
2100
+ linkIdentity(credentials: SignInWithOAuthCredentials): Promise<OAuthResponse>;
2101
+ /**
2102
+ * Links an OIDC identity to an existing user.
2103
+ */
2104
+ linkIdentity(credentials: SignInWithIdTokenCredentials): Promise<AuthTokenResponse>;
2105
+ private linkIdentityOAuth;
2106
+ private linkIdentityIdToken;
2107
+ /**
2108
+ * Unlinks an identity from a user by deleting it. The user will no longer be able to sign in with that identity once it's unlinked.
2109
+ *
2110
+ * @category Auth
2111
+ *
2112
+ * @remarks
2113
+ * - The **Enable Manual Linking** option must be enabled from your [project's authentication settings](/dashboard/project/_/auth/providers).
2114
+ * - The user needs to be signed in to call `unlinkIdentity()`.
2115
+ * - The user must have at least 2 identities in order to unlink an identity.
2116
+ * - The identity to be unlinked must belong to the user.
2117
+ *
2118
+ * @example Unlink an identity
2119
+ * ```js
2120
+ * // retrieve all identities linked to a user
2121
+ * const identities = await supabase.auth.getUserIdentities()
2122
+ *
2123
+ * // find the google identity
2124
+ * const googleIdentity = identities.find(
2125
+ * identity => identity.provider === 'google'
2126
+ * )
2127
+ *
2128
+ * // unlink the google identity
2129
+ * const { error } = await supabase.auth.unlinkIdentity(googleIdentity)
2130
+ * ```
2131
+ */
2132
+ unlinkIdentity(identity: UserIdentity): Promise<{
2133
+ data: {};
2134
+ error: null;
2135
+ } | {
2136
+ data: null;
2137
+ error: AuthError;
2138
+ }>;
2139
+ /**
2140
+ * Generates a new JWT.
2141
+ * @param refreshToken A valid refresh token that was returned on login.
2142
+ */
2143
+ private _refreshAccessToken;
2144
+ private _isValidSession;
2145
+ private _handleProviderSignIn;
2146
+ /**
2147
+ * Recovers the session from LocalStorage and refreshes the token
2148
+ * Note: this method is async to accommodate for AsyncStorage e.g. in React native.
2149
+ */
2150
+ private _recoverAndRefresh;
2151
+ private _callRefreshToken;
2152
+ private _notifyAllSubscribers;
2153
+ /**
2154
+ * set currentSession and currentUser
2155
+ * process to _startAutoRefreshToken if possible
2156
+ */
2157
+ private _saveSession;
2158
+ private _removeSession;
2159
+ /**
2160
+ * Removes any registered visibilitychange callback.
2161
+ *
2162
+ * {@see #startAutoRefresh}
2163
+ * {@see #stopAutoRefresh}
2164
+ */
2165
+ private _removeVisibilityChangedCallback;
2166
+ /**
2167
+ * This is the private implementation of {@link #startAutoRefresh}. Use this
2168
+ * within the library.
2169
+ */
2170
+ private _startAutoRefresh;
2171
+ /**
2172
+ * This is the private implementation of {@link #stopAutoRefresh}. Use this
2173
+ * within the library.
2174
+ */
2175
+ private _stopAutoRefresh;
2176
+ /**
2177
+ * Starts an auto-refresh process in the background. The session is checked
2178
+ * every few seconds. Close to the time of expiration a process is started to
2179
+ * refresh the session. If refreshing fails it will be retried for as long as
2180
+ * necessary.
2181
+ *
2182
+ * If you set the {@link GoTrueClientOptions#autoRefreshToken} you don't need
2183
+ * to call this function, it will be called for you.
2184
+ *
2185
+ * On browsers the refresh process works only when the tab/window is in the
2186
+ * foreground to conserve resources as well as prevent race conditions and
2187
+ * flooding auth with requests. If you call this method any managed
2188
+ * visibility change callback will be removed and you must manage visibility
2189
+ * changes on your own.
2190
+ *
2191
+ * On non-browser platforms the refresh process works *continuously* in the
2192
+ * background, which may not be desirable. You should hook into your
2193
+ * platform's foreground indication mechanism and call these methods
2194
+ * appropriately to conserve resources.
2195
+ *
2196
+ * {@see #stopAutoRefresh}
2197
+ *
2198
+ * @category Auth
2199
+ *
2200
+ * @remarks
2201
+ * - Only useful in non-browser environments such as React Native or Electron.
2202
+ * - The Supabase Auth library automatically starts and stops proactively refreshing the session when a tab is focused or not.
2203
+ * - On non-browser platforms, such as mobile or desktop apps built with web technologies, the library is not able to effectively determine whether the application is _focused_ or not.
2204
+ * - To give this hint to the application, you should be calling this method when the app is in focus and calling `supabase.auth.stopAutoRefresh()` when it's out of focus.
2205
+ *
2206
+ * @example Start and stop auto refresh in React Native
2207
+ * ```js
2208
+ * import { AppState } from 'react-native'
2209
+ *
2210
+ * // make sure you register this only once!
2211
+ * AppState.addEventListener('change', (state) => {
2212
+ * if (state === 'active') {
2213
+ * supabase.auth.startAutoRefresh()
2214
+ * } else {
2215
+ * supabase.auth.stopAutoRefresh()
2216
+ * }
2217
+ * })
2218
+ * ```
2219
+ */
2220
+ startAutoRefresh(): Promise<void>;
2221
+ /**
2222
+ * Stops an active auto refresh process running in the background (if any).
2223
+ *
2224
+ * If you call this method any managed visibility change callback will be
2225
+ * removed and you must manage visibility changes on your own.
2226
+ *
2227
+ * See {@link #startAutoRefresh} for more details.
2228
+ *
2229
+ * @category Auth
2230
+ *
2231
+ * @remarks
2232
+ * - Only useful in non-browser environments such as React Native or Electron.
2233
+ * - The Supabase Auth library automatically starts and stops proactively refreshing the session when a tab is focused or not.
2234
+ * - On non-browser platforms, such as mobile or desktop apps built with web technologies, the library is not able to effectively determine whether the application is _focused_ or not.
2235
+ * - When your application goes in the background or out of focus, call this method to stop the proactive refreshing of the session.
2236
+ *
2237
+ * @example Start and stop auto refresh in React Native
2238
+ * ```js
2239
+ * import { AppState } from 'react-native'
2240
+ *
2241
+ * // make sure you register this only once!
2242
+ * AppState.addEventListener('change', (state) => {
2243
+ * if (state === 'active') {
2244
+ * supabase.auth.startAutoRefresh()
2245
+ * } else {
2246
+ * supabase.auth.stopAutoRefresh()
2247
+ * }
2248
+ * })
2249
+ * ```
2250
+ */
2251
+ stopAutoRefresh(): Promise<void>;
2252
+ /**
2253
+ * Runs the auto refresh token tick.
2254
+ */
2255
+ private _autoRefreshTokenTick;
2256
+ /**
2257
+ * Registers callbacks on the browser / platform, which in-turn run
2258
+ * algorithms when the browser window/tab are in foreground. On non-browser
2259
+ * platforms it assumes always foreground.
2260
+ */
2261
+ private _handleVisibilityChange;
2262
+ /**
2263
+ * Callback registered with `window.addEventListener('visibilitychange')`.
2264
+ */
2265
+ private _onVisibilityChanged;
2266
+ /**
2267
+ * Generates the relevant login URL for a third-party provider.
2268
+ * @param options.redirectTo A URL or mobile address to send the user to after they are confirmed.
2269
+ * @param options.scopes A space-separated list of scopes granted to the OAuth application.
2270
+ * @param options.queryParams An object of key-value pairs containing query parameters granted to the OAuth application.
2271
+ */
2272
+ private _getUrlForProvider;
2273
+ private _unenroll;
2274
+ /**
2275
+ * {@see GoTrueMFAApi#enroll}
2276
+ */
2277
+ private _enroll;
2278
+ /**
2279
+ * {@see GoTrueMFAApi#verify}
2280
+ */
2281
+ private _verify;
2282
+ /**
2283
+ * {@see GoTrueMFAApi#challenge}
2284
+ */
2285
+ private _challenge;
2286
+ /**
2287
+ * {@see GoTrueMFAApi#challengeAndVerify}
2288
+ */
2289
+ private _challengeAndVerify;
2290
+ /**
2291
+ * {@see GoTrueMFAApi#listFactors}
2292
+ */
2293
+ private _listFactors;
2294
+ /**
2295
+ * {@see GoTrueMFAApi#getAuthenticatorAssuranceLevel}
2296
+ */
2297
+ private _getAuthenticatorAssuranceLevel;
2298
+ /**
2299
+ * Retrieves details about an OAuth authorization request.
2300
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
2301
+ *
2302
+ * Returns authorization details including client info, scopes, and user information.
2303
+ * If the response includes only a redirect_url field, it means consent was already given - the caller
2304
+ * should handle the redirect manually if needed.
2305
+ */
2306
+ private _getAuthorizationDetails;
2307
+ /**
2308
+ * Approves an OAuth authorization request.
2309
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
2310
+ */
2311
+ private _approveAuthorization;
2312
+ /**
2313
+ * Denies an OAuth authorization request.
2314
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
2315
+ */
2316
+ private _denyAuthorization;
2317
+ /**
2318
+ * Lists all OAuth grants that the authenticated user has authorized.
2319
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
2320
+ */
2321
+ private _listOAuthGrants;
2322
+ /**
2323
+ * Revokes a user's OAuth grant for a specific client.
2324
+ * Only relevant when the OAuth 2.1 server is enabled in Supabase Auth.
2325
+ */
2326
+ private _revokeOAuthGrant;
2327
+ private fetchJwk;
2328
+ /**
2329
+ * Extracts the JWT claims present in the access token by first verifying the
2330
+ * JWT against the server's JSON Web Key Set endpoint
2331
+ * `/.well-known/jwks.json` which is often cached, resulting in significantly
2332
+ * faster responses. Prefer this method over {@link #getUser} which always
2333
+ * sends a request to the Auth server for each JWT.
2334
+ *
2335
+ * If the project is not using an asymmetric JWT signing key (like ECC or
2336
+ * RSA) it always sends a request to the Auth server (similar to {@link
2337
+ * #getUser}) to verify the JWT.
2338
+ *
2339
+ * @param jwt An optional specific JWT you wish to verify, not the one you
2340
+ * can obtain from {@link #getSession}.
2341
+ * @param options Various additional options that allow you to customize the
2342
+ * behavior of this method.
2343
+ *
2344
+ * @category Auth
2345
+ *
2346
+ * @remarks
2347
+ * - Parses the user's [access token](/docs/guides/auth/sessions#access-token-jwt-claims) as a [JSON Web Token (JWT)](/docs/guides/auth/jwts) and returns its components if valid and not expired.
2348
+ * - If your project is using asymmetric JWT signing keys, then the verification is done locally usually without a network request using the [WebCrypto API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API).
2349
+ * - A network request is sent to your project's JWT signing key discovery endpoint `https://project-id.supabase.co/auth/v1/.well-known/jwks.json`, which is cached locally. If your environment is ephemeral, such as a Lambda function that is destroyed after every request, a network request will be sent for each new invocation. Supabase provides a network-edge cache providing fast responses for these situations.
2350
+ * - If the user's access token is about to expire when calling this function, the user's session will first be refreshed before validating the JWT.
2351
+ * - If your project is using a symmetric secret to sign the JWT, it always sends a request similar to `getUser()` to validate the JWT at the server before returning the decoded token. This is also used if the WebCrypto API is not available in the environment. Make sure you polyfill it in such situations.
2352
+ * - The returned claims can be customized per project using the [Custom Access Token Hook](/docs/guides/auth/auth-hooks/custom-access-token-hook).
2353
+ *
2354
+ * @example Get JWT claims, header and signature
2355
+ * ```js
2356
+ * const { data, error } = await supabase.auth.getClaims()
2357
+ * ```
2358
+ *
2359
+ * @exampleResponse Get JWT claims, header and signature
2360
+ * ```json
2361
+ * {
2362
+ * "data": {
2363
+ * "claims": {
2364
+ * "aal": "aal1",
2365
+ * "amr": [{
2366
+ * "method": "email",
2367
+ * "timestamp": 1715766000
2368
+ * }],
2369
+ * "app_metadata": {},
2370
+ * "aud": "authenticated",
2371
+ * "email": "example@email.com",
2372
+ * "exp": 1715769600,
2373
+ * "iat": 1715766000,
2374
+ * "is_anonymous": false,
2375
+ * "iss": "https://project-id.supabase.co/auth/v1",
2376
+ * "phone": "+13334445555",
2377
+ * "role": "authenticated",
2378
+ * "session_id": "11111111-1111-1111-1111-111111111111",
2379
+ * "sub": "11111111-1111-1111-1111-111111111111",
2380
+ * "user_metadata": {}
2381
+ * },
2382
+ * "header": {
2383
+ * "alg": "RS256",
2384
+ * "typ": "JWT",
2385
+ * "kid": "11111111-1111-1111-1111-111111111111"
2386
+ * },
2387
+ * "signature": [/** Uint8Array *\/],
2388
+ * },
2389
+ * "error": null
2390
+ * }
2391
+ * ```
2392
+ */
2393
+ getClaims(jwt?: string, options?: {
2394
+ /**
2395
+ * @deprecated Please use options.jwks instead.
2396
+ */
2397
+ keys?: JWK[];
2398
+ /** If set to `true` the `exp` claim will not be validated against the current time. */
2399
+ allowExpired?: boolean;
2400
+ /** If set, this JSON Web Key Set is going to have precedence over the cached value available on the server. */
2401
+ jwks?: {
2402
+ keys: JWK[];
2403
+ };
2404
+ }): Promise<{
2405
+ data: {
2406
+ claims: JwtPayload;
2407
+ header: JwtHeader;
2408
+ signature: Uint8Array;
2409
+ };
2410
+ error: null;
2411
+ } | {
2412
+ data: null;
2413
+ error: AuthError;
2414
+ } | {
2415
+ data: null;
2416
+ error: null;
2417
+ }>;
2418
+ /**
2419
+ * Sign in with a passkey. Handles the full WebAuthn ceremony:
2420
+ * 1. Fetches authentication challenge from server
2421
+ * 2. Prompts user via navigator.credentials.get()
2422
+ * 3. Verifies credential with server and creates session
2423
+ *
2424
+ * Requires `auth.experimental.passkey: true`.
2425
+ *
2426
+ * @category Auth
2427
+ */
2428
+ signInWithPasskey(credentials?: SignInWithPasskeyCredentials): Promise<AuthPasskeyAuthenticationVerifyResponse>;
2429
+ /**
2430
+ * Register a passkey for the current authenticated user. Handles the full WebAuthn ceremony:
2431
+ * 1. Fetches registration challenge from server
2432
+ * 2. Prompts user via navigator.credentials.create()
2433
+ * 3. Verifies credential with server
2434
+ *
2435
+ * Requires an active session. Requires `auth.experimental.passkey: true`.
2436
+ *
2437
+ * @category Auth
2438
+ */
2439
+ registerPasskey(credentials?: RegisterPasskeyCredentials): Promise<AuthPasskeyRegistrationVerifyResponse>;
2440
+ /**
2441
+ * Start passkey registration for the current authenticated user.
2442
+ * Returns WebAuthn credential creation options to pass to navigator.credentials.create().
2443
+ */
2444
+ private _startPasskeyRegistration;
2445
+ /**
2446
+ * Verify passkey registration with the credential response.
2447
+ * The credentialResponse should be the serialized output of navigator.credentials.create().
2448
+ */
2449
+ private _verifyPasskeyRegistration;
2450
+ /**
2451
+ * Start passkey authentication.
2452
+ * Returns WebAuthn credential request options to pass to navigator.credentials.get().
2453
+ */
2454
+ private _startPasskeyAuthentication;
2455
+ /**
2456
+ * Verify passkey authentication and create a session.
2457
+ * The credential should be the serialized output of navigator.credentials.get().
2458
+ */
2459
+ private _verifyPasskeyAuthentication;
2460
+ /**
2461
+ * List all passkeys for the current user.
2462
+ */
2463
+ private _listPasskeys;
2464
+ /**
2465
+ * Update a passkey.
2466
+ */
2467
+ private _updatePasskey;
2468
+ /**
2469
+ * Delete a passkey.
2470
+ */
2471
+ private _deletePasskey;
2472
+ }
2473
+ //# sourceMappingURL=GoTrueClient.d.ts.map