Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@whimslab/auth

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@whimslab/auth - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

2

package.json
{
"name": "@whimslab/auth",
"version": "0.0.23",
"version": "0.0.24",
"description": "WhimsBuilder user authentication utilities",

@@ -5,0 +5,0 @@ "main": "./runtime-auth.umd.js",

@@ -45,3 +45,3 @@ import { writable as o } from "svelte/store";

function f(t, s) {
return fetch("/api/auth/reset-password", {
return fetch("/api/auth/resetPassword", {
method: "POST",

@@ -48,0 +48,0 @@ headers: {

@@ -1,1 +0,1 @@

(function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("svelte/store")):typeof define=="function"&&define.amd?define(["exports","svelte/store"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t["runtime-auth"]={},t.store))})(this,function(t,n){"use strict";async function u(e){i.set(void 0),console.log("Fetching user profile");try{a.set(!0);const s=await fetch("/api/auth/profile");if(s.status===200){const r=await s.json();e&&e(r)}else{const r=await s.json();i.set(r),o.set(void 0)}}finally{a.set(!1)}}async function d(){const e=await fetch("/api/auth/signout",{method:"POST"});if(e.status===200)return o.set(void 0),await e.json();throw Error(`Unable to signout: ${e.status}, ${await e.json()}`)}const i=n.writable(void 0),a=n.writable(!1),o=n.writable(null,e=>(u(s=>{console.log("Setting user store:",s),e(s)}),()=>{}));async function l(){return await u(s=>{console.log("Resetting user store:",s),o.set(s)})}function f(e){return fetch("/api/auth/sendResetPasswordEmail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})})}function c(e,s){return fetch("/api/auth/reset-password",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e,token:s})})}t.error=i,t.loading=a,t.reloadUser=l,t.resetPassword=c,t.sendResetPasswordEmail=f,t.signout=d,t.user=o,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
(function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("svelte/store")):typeof define=="function"&&define.amd?define(["exports","svelte/store"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t["runtime-auth"]={},t.store))})(this,function(t,n){"use strict";async function u(e){i.set(void 0),console.log("Fetching user profile");try{a.set(!0);const s=await fetch("/api/auth/profile");if(s.status===200){const r=await s.json();e&&e(r)}else{const r=await s.json();i.set(r),o.set(void 0)}}finally{a.set(!1)}}async function d(){const e=await fetch("/api/auth/signout",{method:"POST"});if(e.status===200)return o.set(void 0),await e.json();throw Error(`Unable to signout: ${e.status}, ${await e.json()}`)}const i=n.writable(void 0),a=n.writable(!1),o=n.writable(null,e=>(u(s=>{console.log("Setting user store:",s),e(s)}),()=>{}));async function l(){return await u(s=>{console.log("Resetting user store:",s),o.set(s)})}function f(e){return fetch("/api/auth/sendResetPasswordEmail",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e})})}function c(e,s){return fetch("/api/auth/resetPassword",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({password:e,token:s})})}t.error=i,t.loading=a,t.reloadUser=l,t.resetPassword=c,t.sendResetPasswordEmail=f,t.signout=d,t.user=o,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc