@supabase/auth-js 2.113.0 → 2.114.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supabase/auth-js",
3
- "version": "2.113.0",
3
+ "version": "2.114.0",
4
4
  "private": false,
5
5
  "description": "Official SDK for Supabase Auth",
6
6
  "keywords": [
@@ -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.113.0'
7
+ export const version = '2.114.0'
@@ -895,11 +895,15 @@ export class WebAuthnApi {
895
895
  await this.client.mfa
896
896
  .listFactors()
897
897
  .then((factors) =>
898
+ // Only an unverified factor is leftover from the enrollment that just
899
+ // failed, and removing it is what lets a retry with the same name
900
+ // succeed. A verified factor of that name is a passkey the user is
901
+ // already using, so it must never be selected here.
898
902
  factors.data?.all.find(
899
903
  (v) =>
900
904
  v.factor_type === 'webauthn' &&
901
905
  v.friendly_name === friendlyName &&
902
- v.status !== 'unverified'
906
+ v.status === 'unverified'
903
907
  )
904
908
  )
905
909
  .then((factor) => (factor ? this.client.mfa.unenroll({ factorId: factor?.id }) : void 0))