UNPKG

waterbase

Version:
44 lines (43 loc) 1.06 kB
import Service from '../Service'; import User from '../helpers/User'; declare class Auth extends Service { /** * * Will create the account and create a JWT and store it (login) * * @param email string * * @param password string * * @param profile object * * @return Promise<User> */ CreateAccount: (email: string, password: string, profile?: object | undefined) => Promise<User>; /** * * Will create JWT and store it if the user exists * * @param email string * * @param password string * * @return Promise<User> */ loginWithEmailAndPassword: (email: string, password: string) => Promise<User>; /** * * Will decode the current JWT and return it * * @return Promise<User> */ getCurrentUser: () => Promise<User>; /** * * Will sign out the user from its account * * @return Promise<any> */ signOut: () => Promise<unknown>; } export = Auth;