@fluxbase/sdk 0.0.1-rc.117 → 0.0.1-rc.118
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 +6 -4
- 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 +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3784,10 +3784,11 @@ declare class FluxbaseAuth {
|
|
|
3784
3784
|
* Send password reset email (Supabase-compatible)
|
|
3785
3785
|
* Sends a password reset link to the provided email address
|
|
3786
3786
|
* @param email - Email address to send reset link to
|
|
3787
|
-
* @param options - Optional configuration including CAPTCHA token
|
|
3787
|
+
* @param options - Optional configuration including redirect URL and CAPTCHA token
|
|
3788
3788
|
* @returns Promise with OTP-style response
|
|
3789
3789
|
*/
|
|
3790
3790
|
sendPasswordReset(email: string, options?: {
|
|
3791
|
+
redirectTo?: string;
|
|
3791
3792
|
captchaToken?: string;
|
|
3792
3793
|
}): Promise<DataResponse<PasswordResetResponse>>;
|
|
3793
3794
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -3784,10 +3784,11 @@ declare class FluxbaseAuth {
|
|
|
3784
3784
|
* Send password reset email (Supabase-compatible)
|
|
3785
3785
|
* Sends a password reset link to the provided email address
|
|
3786
3786
|
* @param email - Email address to send reset link to
|
|
3787
|
-
* @param options - Optional configuration including CAPTCHA token
|
|
3787
|
+
* @param options - Optional configuration including redirect URL and CAPTCHA token
|
|
3788
3788
|
* @returns Promise with OTP-style response
|
|
3789
3789
|
*/
|
|
3790
3790
|
sendPasswordReset(email: string, options?: {
|
|
3791
|
+
redirectTo?: string;
|
|
3791
3792
|
captchaToken?: string;
|
|
3792
3793
|
}): Promise<DataResponse<PasswordResetResponse>>;
|
|
3793
3794
|
/**
|
package/dist/index.js
CHANGED
|
@@ -756,12 +756,15 @@ var FluxbaseAuth = class {
|
|
|
756
756
|
* Send password reset email (Supabase-compatible)
|
|
757
757
|
* Sends a password reset link to the provided email address
|
|
758
758
|
* @param email - Email address to send reset link to
|
|
759
|
-
* @param options - Optional configuration including CAPTCHA token
|
|
759
|
+
* @param options - Optional configuration including redirect URL and CAPTCHA token
|
|
760
760
|
* @returns Promise with OTP-style response
|
|
761
761
|
*/
|
|
762
762
|
async sendPasswordReset(email, options) {
|
|
763
763
|
return wrapAsync(async () => {
|
|
764
764
|
const requestBody = { email };
|
|
765
|
+
if (options?.redirectTo) {
|
|
766
|
+
requestBody.redirect_to = options.redirectTo;
|
|
767
|
+
}
|
|
765
768
|
if (options?.captchaToken) {
|
|
766
769
|
requestBody.captcha_token = options.captchaToken;
|
|
767
770
|
}
|
|
@@ -777,6 +780,7 @@ var FluxbaseAuth = class {
|
|
|
777
780
|
*/
|
|
778
781
|
async resetPasswordForEmail(email, options) {
|
|
779
782
|
return this.sendPasswordReset(email, {
|
|
783
|
+
redirectTo: options?.redirectTo,
|
|
780
784
|
captchaToken: options?.captchaToken
|
|
781
785
|
});
|
|
782
786
|
}
|
|
@@ -915,9 +919,7 @@ var FluxbaseAuth = class {
|
|
|
915
919
|
return wrapAsync(async () => {
|
|
916
920
|
const provider = this.storage?.getItem(OAUTH_PROVIDER_KEY);
|
|
917
921
|
if (!provider) {
|
|
918
|
-
throw new Error(
|
|
919
|
-
"No OAuth provider found. Call signInWithOAuth first."
|
|
920
|
-
);
|
|
922
|
+
throw new Error("No OAuth provider found. Call signInWithOAuth first.");
|
|
921
923
|
}
|
|
922
924
|
const params = new URLSearchParams({ code });
|
|
923
925
|
if (state) {
|