mfa.enroll
's return type has a TypeScript breaking change in v2.65.0
#955
Labels
bug
Something isn't working
Bug report
Describe the bug
As of v2.65.0 and b957c30, the
mfa.enroll
function's return-type has changed, so that the following code in the official TOTP docs now throws a TypeScript error:https://github.com/supabase/supabase/blob/7f0a216c40dafdd14ae99b7a6efe4801e8306144/apps/docs/content/guides/auth/auth-mfa/totp.mdx?plain=1#L122-L133
To Reproduce
Add the following test to this repo:
Running the tests will then cause the following TypeScript error in v2.65.0, but not before v2.65.0:
Expected behavior
Either:
Existing code should still function when updated to v2.65.0. E.g. the
mfa.enroll
function has types that say it never returns atype: "phone"
whenfactorType: "totp"
is passed. This could be done by using eitherIf this is not possible, at least updating the docs in https://github.com/supabase/supabase/blob/7f0a216c40dafdd14ae99b7a6efe4801e8306144/apps/docs/content/guides/auth/auth-mfa/totp.mdx?plain=1#L122-L133
Screenshots
N/A
System information
Additional context
N/A
The text was updated successfully, but these errors were encountered: