diff --git a/src/GoTrueClient.ts b/src/GoTrueClient.ts index f9a33978..4edf4bc1 100644 --- a/src/GoTrueClient.ts +++ b/src/GoTrueClient.ts @@ -2453,19 +2453,9 @@ export default class GoTrueClient { return { data, error } } else if ('factorType' in params && params.factorType === 'webauthn') { // Single Step enroll - // TODO: Replace the placeholder - const { data, error } = await _request( - this.fetch, - 'POST', - `${this.url}/factors/verify`, - { - body: { - factorType: params.factorType, - }, - headers: this.headers, - jwt: sessionData?.session?.access_token, - } - ) + const { data, error } = await this._challengeAndVerify({ + factorType: 'webauthn', + }) if (error) { return { data: null, error } }