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