@fluxbase/sdk 0.0.1-rc.33 → 0.0.1-rc.34
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/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1751,9 +1751,10 @@ declare class FluxbaseAuth {
|
|
|
1751
1751
|
/**
|
|
1752
1752
|
* Setup 2FA for the current user (Supabase-compatible)
|
|
1753
1753
|
* Enrolls a new MFA factor and returns TOTP details
|
|
1754
|
+
* @param issuer - Optional custom issuer name for the QR code (e.g., "MyApp"). If not provided, uses server default.
|
|
1754
1755
|
* @returns Promise with factor id, type, and TOTP setup details
|
|
1755
1756
|
*/
|
|
1756
|
-
setup2FA(): Promise<DataResponse<TwoFactorSetupResponse>>;
|
|
1757
|
+
setup2FA(issuer?: string): Promise<DataResponse<TwoFactorSetupResponse>>;
|
|
1757
1758
|
/**
|
|
1758
1759
|
* Enable 2FA after verifying the TOTP code (Supabase-compatible)
|
|
1759
1760
|
* Verifies the TOTP code and returns new tokens with MFA session
|
package/dist/index.d.ts
CHANGED
|
@@ -1751,9 +1751,10 @@ declare class FluxbaseAuth {
|
|
|
1751
1751
|
/**
|
|
1752
1752
|
* Setup 2FA for the current user (Supabase-compatible)
|
|
1753
1753
|
* Enrolls a new MFA factor and returns TOTP details
|
|
1754
|
+
* @param issuer - Optional custom issuer name for the QR code (e.g., "MyApp"). If not provided, uses server default.
|
|
1754
1755
|
* @returns Promise with factor id, type, and TOTP setup details
|
|
1755
1756
|
*/
|
|
1756
|
-
setup2FA(): Promise<DataResponse<TwoFactorSetupResponse>>;
|
|
1757
|
+
setup2FA(issuer?: string): Promise<DataResponse<TwoFactorSetupResponse>>;
|
|
1757
1758
|
/**
|
|
1758
1759
|
* Enable 2FA after verifying the TOTP code (Supabase-compatible)
|
|
1759
1760
|
* Verifies the TOTP code and returns new tokens with MFA session
|
package/dist/index.js
CHANGED
|
@@ -355,15 +355,17 @@ var FluxbaseAuth = class {
|
|
|
355
355
|
/**
|
|
356
356
|
* Setup 2FA for the current user (Supabase-compatible)
|
|
357
357
|
* Enrolls a new MFA factor and returns TOTP details
|
|
358
|
+
* @param issuer - Optional custom issuer name for the QR code (e.g., "MyApp"). If not provided, uses server default.
|
|
358
359
|
* @returns Promise with factor id, type, and TOTP setup details
|
|
359
360
|
*/
|
|
360
|
-
async setup2FA() {
|
|
361
|
+
async setup2FA(issuer) {
|
|
361
362
|
return wrapAsync(async () => {
|
|
362
363
|
if (!this.session) {
|
|
363
364
|
throw new Error("Not authenticated");
|
|
364
365
|
}
|
|
365
366
|
return await this.fetch.post(
|
|
366
|
-
"/api/v1/auth/2fa/setup"
|
|
367
|
+
"/api/v1/auth/2fa/setup",
|
|
368
|
+
issuer ? { issuer } : void 0
|
|
367
369
|
);
|
|
368
370
|
});
|
|
369
371
|
}
|