@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.cjs
CHANGED
|
@@ -758,12 +758,15 @@ var FluxbaseAuth = class {
|
|
|
758
758
|
* Send password reset email (Supabase-compatible)
|
|
759
759
|
* Sends a password reset link to the provided email address
|
|
760
760
|
* @param email - Email address to send reset link to
|
|
761
|
-
* @param options - Optional configuration including CAPTCHA token
|
|
761
|
+
* @param options - Optional configuration including redirect URL and CAPTCHA token
|
|
762
762
|
* @returns Promise with OTP-style response
|
|
763
763
|
*/
|
|
764
764
|
async sendPasswordReset(email, options) {
|
|
765
765
|
return wrapAsync(async () => {
|
|
766
766
|
const requestBody = { email };
|
|
767
|
+
if (options?.redirectTo) {
|
|
768
|
+
requestBody.redirect_to = options.redirectTo;
|
|
769
|
+
}
|
|
767
770
|
if (options?.captchaToken) {
|
|
768
771
|
requestBody.captcha_token = options.captchaToken;
|
|
769
772
|
}
|
|
@@ -779,6 +782,7 @@ var FluxbaseAuth = class {
|
|
|
779
782
|
*/
|
|
780
783
|
async resetPasswordForEmail(email, options) {
|
|
781
784
|
return this.sendPasswordReset(email, {
|
|
785
|
+
redirectTo: options?.redirectTo,
|
|
782
786
|
captchaToken: options?.captchaToken
|
|
783
787
|
});
|
|
784
788
|
}
|
|
@@ -917,9 +921,7 @@ var FluxbaseAuth = class {
|
|
|
917
921
|
return wrapAsync(async () => {
|
|
918
922
|
const provider = this.storage?.getItem(OAUTH_PROVIDER_KEY);
|
|
919
923
|
if (!provider) {
|
|
920
|
-
throw new Error(
|
|
921
|
-
"No OAuth provider found. Call signInWithOAuth first."
|
|
922
|
-
);
|
|
924
|
+
throw new Error("No OAuth provider found. Call signInWithOAuth first.");
|
|
923
925
|
}
|
|
924
926
|
const params = new URLSearchParams({ code });
|
|
925
927
|
if (state) {
|