@insforge/react 0.5.0 → 0.5.2

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/forms.cjs CHANGED
@@ -626,7 +626,29 @@ var InsforgeContext = react.createContext(void 0);
626
626
  function useInsforge() {
627
627
  const context = react.useContext(InsforgeContext);
628
628
  if (!context) {
629
- throw new Error("useInsforge must be used within InsforgeProvider");
629
+ return {
630
+ user: null,
631
+ isLoaded: false,
632
+ isSignedIn: false,
633
+ setUser: () => {
634
+ },
635
+ signIn: async () => ({ error: "SSR mode" }),
636
+ signUp: async () => ({ error: "SSR mode" }),
637
+ signOut: async () => {
638
+ },
639
+ updateUser: async () => {
640
+ },
641
+ reloadAuth: async () => ({ success: false, error: "SSR mode" }),
642
+ sendVerificationEmail: async () => null,
643
+ sendResetPasswordEmail: async () => null,
644
+ resetPassword: async () => null,
645
+ verifyEmail: async () => null,
646
+ exchangeResetPasswordToken: async () => ({ error: { message: "SSR mode" } }),
647
+ loginWithOAuth: async () => {
648
+ },
649
+ getPublicAuthConfig: async () => null,
650
+ baseUrl: ""
651
+ };
630
652
  }
631
653
  return context;
632
654
  }