@supabase/auth-js 2.117.0-canary.0 → 2.117.0

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 (46) hide show
  1. package/dist/main/GoTrueAdminApi.d.ts +0 -6
  2. package/dist/main/GoTrueAdminApi.d.ts.map +1 -1
  3. package/dist/main/GoTrueAdminApi.js +0 -6
  4. package/dist/main/GoTrueAdminApi.js.map +1 -1
  5. package/dist/main/GoTrueClient.d.ts +1 -5
  6. package/dist/main/GoTrueClient.d.ts.map +1 -1
  7. package/dist/main/GoTrueClient.js +1 -12
  8. package/dist/main/GoTrueClient.js.map +1 -1
  9. package/dist/main/lib/helpers.d.ts +0 -3
  10. package/dist/main/lib/helpers.d.ts.map +1 -1
  11. package/dist/main/lib/helpers.js +0 -6
  12. package/dist/main/lib/helpers.js.map +1 -1
  13. package/dist/main/lib/types.d.ts +7 -6
  14. package/dist/main/lib/types.d.ts.map +1 -1
  15. package/dist/main/lib/types.js.map +1 -1
  16. package/dist/main/lib/version.d.ts +1 -1
  17. package/dist/main/lib/version.d.ts.map +1 -1
  18. package/dist/main/lib/version.js +1 -1
  19. package/dist/main/lib/version.js.map +1 -1
  20. package/dist/module/GoTrueAdminApi.d.ts +0 -6
  21. package/dist/module/GoTrueAdminApi.d.ts.map +1 -1
  22. package/dist/module/GoTrueAdminApi.js +1 -7
  23. package/dist/module/GoTrueAdminApi.js.map +1 -1
  24. package/dist/module/GoTrueClient.d.ts +1 -5
  25. package/dist/module/GoTrueClient.d.ts.map +1 -1
  26. package/dist/module/GoTrueClient.js +2 -13
  27. package/dist/module/GoTrueClient.js.map +1 -1
  28. package/dist/module/lib/helpers.d.ts +0 -3
  29. package/dist/module/lib/helpers.d.ts.map +1 -1
  30. package/dist/module/lib/helpers.js +0 -5
  31. package/dist/module/lib/helpers.js.map +1 -1
  32. package/dist/module/lib/types.d.ts +7 -6
  33. package/dist/module/lib/types.d.ts.map +1 -1
  34. package/dist/module/lib/types.js.map +1 -1
  35. package/dist/module/lib/version.d.ts +1 -1
  36. package/dist/module/lib/version.d.ts.map +1 -1
  37. package/dist/module/lib/version.js +1 -1
  38. package/dist/module/lib/version.js.map +1 -1
  39. package/dist/tsconfig.module.tsbuildinfo +1 -1
  40. package/dist/tsconfig.tsbuildinfo +1 -1
  41. package/package.json +1 -1
  42. package/src/GoTrueAdminApi.ts +1 -9
  43. package/src/GoTrueClient.ts +1 -15
  44. package/src/lib/helpers.ts +0 -8
  45. package/src/lib/types.ts +7 -6
  46. package/src/lib/version.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supabase/auth-js",
3
- "version": "2.117.0-canary.0",
3
+ "version": "2.117.0",
4
4
  "private": false,
5
5
  "description": "Official SDK for Supabase Auth",
6
6
  "keywords": [
@@ -5,7 +5,7 @@ import {
5
5
  _request,
6
6
  _userResponse,
7
7
  } from './lib/fetch'
8
- import { assertPasskeyExperimentalEnabled, resolveFetch, validateUUID } from './lib/helpers'
8
+ import { resolveFetch, validateUUID } from './lib/helpers'
9
9
  import {
10
10
  AdminUserAttributes,
11
11
  GenerateLinkParams,
@@ -56,8 +56,6 @@ export default class GoTrueAdminApi {
56
56
 
57
57
  /**
58
58
  * Contains all passkey administration methods.
59
- *
60
- * Requires `auth.experimental.passkey: true`; otherwise all methods throw.
61
59
  */
62
60
  passkey: GoTrueAdminPasskeyApi
63
61
 
@@ -1208,13 +1206,10 @@ export default class GoTrueAdminApi {
1208
1206
  * Lists all passkeys for a user.
1209
1207
  *
1210
1208
  * This function should only be called on a server. Never expose your secret key in the browser.
1211
- *
1212
- * Requires `auth.experimental.passkey: true`.
1213
1209
  */
1214
1210
  private async _adminListPasskeys(
1215
1211
  params: AuthPasskeyAdminListParams
1216
1212
  ): Promise<AuthPasskeyListResponse> {
1217
- assertPasskeyExperimentalEnabled(this.experimental)
1218
1213
  validateUUID(params.userId)
1219
1214
 
1220
1215
  try {
@@ -1236,13 +1231,10 @@ export default class GoTrueAdminApi {
1236
1231
  * Deletes a user's passkey.
1237
1232
  *
1238
1233
  * This function should only be called on a server. Never expose your secret key in the browser.
1239
- *
1240
- * Requires `auth.experimental.passkey: true`.
1241
1234
  */
1242
1235
  private async _adminDeletePasskey(
1243
1236
  params: AuthPasskeyAdminDeleteParams
1244
1237
  ): Promise<AuthPasskeyDeleteResponse> {
1245
- assertPasskeyExperimentalEnabled(this.experimental)
1246
1238
  validateUUID(params.userId)
1247
1239
  validateUUID(params.passkeyId)
1248
1240
 
@@ -38,7 +38,6 @@ import {
38
38
  } from './lib/fetch'
39
39
  import {
40
40
  appendFlowIdToRedirectTo,
41
- assertPasskeyExperimentalEnabled,
42
41
  assertRecoveryCodesExperimentalEnabled,
43
42
  decodeJWT,
44
43
  deepClone,
@@ -263,8 +262,6 @@ export default class GoTrueClient {
263
262
  /**
264
263
  * Namespace for passkey methods.
265
264
  * Includes lower-level two-step registration/authentication and passkey management.
266
- *
267
- * Requires `auth.experimental.passkey: true`; otherwise all methods throw.
268
265
  */
269
266
  passkey: AuthPasskeyApi
270
267
  /**
@@ -6818,8 +6815,6 @@ export default class GoTrueClient {
6818
6815
  * resolves with a `WebAuthnError` whose code is `ERROR_CEREMONY_ABORTED`. If
6819
6816
  * you pass your own `signal`, abort it before retrying.
6820
6817
  *
6821
- * Requires `auth.experimental.passkey: true`.
6822
- *
6823
6818
  * @category Auth
6824
6819
  *
6825
6820
  * @example Sign in with Conditional UI (passkey autofill)
@@ -6835,7 +6830,6 @@ export default class GoTrueClient {
6835
6830
  async signInWithPasskey(
6836
6831
  credentials?: SignInWithPasskeyCredentials
6837
6832
  ): Promise<AuthPasskeyAuthenticationVerifyResponse> {
6838
- assertPasskeyExperimentalEnabled(this.experimental)
6839
6833
  try {
6840
6834
  if (!browserSupportsWebAuthn()) {
6841
6835
  return this._returnResult({
@@ -6887,14 +6881,13 @@ export default class GoTrueClient {
6887
6881
  * 2. Prompts user via navigator.credentials.create()
6888
6882
  * 3. Verifies credential with server
6889
6883
  *
6890
- * Requires an active session. Requires `auth.experimental.passkey: true`.
6884
+ * Requires an active session.
6891
6885
  *
6892
6886
  * @category Auth
6893
6887
  */
6894
6888
  async registerPasskey(
6895
6889
  credentials?: RegisterPasskeyCredentials
6896
6890
  ): Promise<AuthPasskeyRegistrationVerifyResponse> {
6897
- assertPasskeyExperimentalEnabled(this.experimental)
6898
6891
  try {
6899
6892
  if (!browserSupportsWebAuthn()) {
6900
6893
  return this._returnResult({
@@ -6942,7 +6935,6 @@ export default class GoTrueClient {
6942
6935
  * Returns WebAuthn credential creation options to pass to navigator.credentials.create().
6943
6936
  */
6944
6937
  private async _startPasskeyRegistration(): Promise<AuthPasskeyRegistrationOptionsResponse> {
6945
- assertPasskeyExperimentalEnabled(this.experimental)
6946
6938
  try {
6947
6939
  return await this._useSession(async (result) => {
6948
6940
  const {
@@ -6985,7 +6977,6 @@ export default class GoTrueClient {
6985
6977
  private async _verifyPasskeyRegistration(
6986
6978
  params: VerifyPasskeyRegistrationParams
6987
6979
  ): Promise<AuthPasskeyRegistrationVerifyResponse> {
6988
- assertPasskeyExperimentalEnabled(this.experimental)
6989
6980
  try {
6990
6981
  return await this._useSession(async (result) => {
6991
6982
  const {
@@ -7031,7 +7022,6 @@ export default class GoTrueClient {
7031
7022
  private async _startPasskeyAuthentication(
7032
7023
  params?: StartPasskeyAuthenticationParams
7033
7024
  ): Promise<AuthPasskeyAuthenticationOptionsResponse> {
7034
- assertPasskeyExperimentalEnabled(this.experimental)
7035
7025
  try {
7036
7026
  const { data, error } = await _request(
7037
7027
  this.fetch,
@@ -7063,7 +7053,6 @@ export default class GoTrueClient {
7063
7053
  private async _verifyPasskeyAuthentication(
7064
7054
  params: VerifyPasskeyAuthenticationParams
7065
7055
  ): Promise<AuthPasskeyAuthenticationVerifyResponse> {
7066
- assertPasskeyExperimentalEnabled(this.experimental)
7067
7056
  try {
7068
7057
  const { data, error } = await _request(
7069
7058
  this.fetch,
@@ -7098,7 +7087,6 @@ export default class GoTrueClient {
7098
7087
  * List all passkeys for the current user.
7099
7088
  */
7100
7089
  private async _listPasskeys(): Promise<AuthPasskeyListResponse> {
7101
- assertPasskeyExperimentalEnabled(this.experimental)
7102
7090
  try {
7103
7091
  return await this._useSession(async (result) => {
7104
7092
  const {
@@ -7133,7 +7121,6 @@ export default class GoTrueClient {
7133
7121
  * Update a passkey.
7134
7122
  */
7135
7123
  private async _updatePasskey(params: PasskeyUpdateParams): Promise<AuthPasskeyUpdateResponse> {
7136
- assertPasskeyExperimentalEnabled(this.experimental)
7137
7124
  try {
7138
7125
  return await this._useSession(async (result) => {
7139
7126
  const {
@@ -7173,7 +7160,6 @@ export default class GoTrueClient {
7173
7160
  * Delete a passkey.
7174
7161
  */
7175
7162
  private async _deletePasskey(params: PasskeyDeleteParams): Promise<AuthPasskeyDeleteResponse> {
7176
- assertPasskeyExperimentalEnabled(this.experimental)
7177
7163
  try {
7178
7164
  return await this._useSession(async (result) => {
7179
7165
  const {
@@ -569,14 +569,6 @@ export function validateUUID(str: string) {
569
569
  }
570
570
  }
571
571
 
572
- export function assertPasskeyExperimentalEnabled(experimental: { passkey?: boolean }): void {
573
- if (!experimental.passkey) {
574
- throw new Error(
575
- '@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).'
576
- )
577
- }
578
- }
579
-
580
572
  export function assertRecoveryCodesExperimentalEnabled(experimental: {
581
573
  recoveryCodes?: boolean
582
574
  }): void {
package/src/lib/types.ts CHANGED
@@ -181,13 +181,14 @@ export type GoTrueClientOptions = {
181
181
 
182
182
  export type ExperimentalFeatureFlags = {
183
183
  /**
184
- * Enables passkey support:
185
- * - `auth.signInWithPasskey()`, `auth.registerPasskey()`
186
- * - `auth.passkey.*`
187
- * - `auth.admin.passkey.*`
184
+ * Previously required to enable the passkey API (`auth.signInWithPasskey()`,
185
+ * `auth.registerPasskey()`, `auth.passkey.*`, `auth.admin.passkey.*`).
188
186
  *
189
- * Defaults to `false`. Calling any passkey method while this flag is
190
- * disabled throws a descriptive error at call time.
187
+ * Passkeys are now enabled by default and this flag is ignored. It is kept
188
+ * only so existing code that sets it keeps compiling and will be removed in
189
+ * the next major version.
190
+ *
191
+ * @deprecated Passkeys are enabled by default; this flag has no effect.
191
192
  */
192
193
  passkey?: boolean
193
194
  /**
@@ -4,4 +4,4 @@
4
4
  // - Debugging and support (identifying which version is running)
5
5
  // - Telemetry and logging (version reporting in errors/analytics)
6
6
  // - Ensuring build artifacts match the published package version
7
- export const version = '2.117.0-canary.0'
7
+ export const version = '2.117.0'