Skip to content

Commit

Permalink
fix: swap multi-step with challengeAndVerify
Browse files Browse the repository at this point in the history
  • Loading branch information
J0 committed Sep 19, 2024
1 parent f2ca00f commit 1745cce
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/GoTrueClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}
Expand Down

0 comments on commit 1745cce

Please sign in to comment.