@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/index.js CHANGED
@@ -415,7 +415,29 @@ function InsforgeProvider({
415
415
  function useInsforge() {
416
416
  const context = useContext(InsforgeContext);
417
417
  if (!context) {
418
- throw new Error("useInsforge must be used within InsforgeProvider");
418
+ return {
419
+ user: null,
420
+ isLoaded: false,
421
+ isSignedIn: false,
422
+ setUser: () => {
423
+ },
424
+ signIn: async () => ({ error: "SSR mode" }),
425
+ signUp: async () => ({ error: "SSR mode" }),
426
+ signOut: async () => {
427
+ },
428
+ updateUser: async () => {
429
+ },
430
+ reloadAuth: async () => ({ success: false, error: "SSR mode" }),
431
+ sendVerificationEmail: async () => null,
432
+ sendResetPasswordEmail: async () => null,
433
+ resetPassword: async () => null,
434
+ verifyEmail: async () => null,
435
+ exchangeResetPasswordToken: async () => ({ error: { message: "SSR mode" } }),
436
+ loginWithOAuth: async () => {
437
+ },
438
+ getPublicAuthConfig: async () => null,
439
+ baseUrl: ""
440
+ };
419
441
  }
420
442
  return context;
421
443
  }