corellium-typescript
Version:
A beautiful TypeScript Corellium library.
1 lines • 732 B
JavaScript
const r=r=>({changePassword:async e=>{const o=await r.POST("/v1/users/change-password",{body:{user:e.userId,"old-password":e.oldPassword,"new-password":e.newPassword}});if(o.error)throw new Error(o.error.error);return o.data},resetPassword:async e=>{const o=await r.POST("/v1/users/reset-password",{body:{token:e.token,totpToken:e.totpToken,"new-password":e.newPassword}});if(o.error)throw new Error(o.error.error);return o.data},sendResetPasswordEmail:async e=>{const o=await r.POST("/v1/users/send-reset-link",{body:e});if(o.error)throw new Error(o.error.error);return o.data},consent:async()=>{const e=await r.POST("/v1/users/agree",{});if(e.error)throw new Error(e.error.error);return e.data}});export{r as createAuthEndpoints};