Skip to content

Commit

Permalink
fix: clean up todos
Browse files Browse the repository at this point in the history
  • Loading branch information
J0 committed Sep 26, 2024
1 parent 9d23c3d commit 12e684f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/GoTrueClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,8 @@ export default class GoTrueClient {
if (error) {
this._debug('#_initialize()', 'error detecting session from URL', error)

// hacky workaround to keep the existing session if there's an error returned from identity linking
// TODO: once error codes are ready, we should match against it instead of the message
if (

Check failure on line 316 in src/GoTrueClient.ts

View workflow job for this annotation

GitHub Actions / Test / OS ubuntu-latest / Node 18

Cannot find name 'identity_already_exists'.

Check failure on line 316 in src/GoTrueClient.ts

View workflow job for this annotation

GitHub Actions / Test / OS ubuntu-latest / Node 20

Cannot find name 'identity_already_exists'.
error?.message === 'Identity is already linked' ||
error?.message === 'Identity is already linked to another user'
error?.code === identity_already_exists
) {
return { error }
}
Expand Down Expand Up @@ -2388,11 +2385,6 @@ export default class GoTrueClient {
return { data: null, error }
}

// TODO: Remove once: https://github.com/supabase/auth/pull/1717 is deployed
if (params.factorType === 'phone') {
delete data.totp
}

if (params.factorType === 'totp' && data?.totp?.qr_code) {
data.totp.qr_code = `data:image/svg+xml;utf-8,${data.totp.qr_code}`
}
Expand Down

0 comments on commit 12e684f

Please sign in to comment.