npm.io
1.0.8 • Published 5 years ago

useauthrocket

Licence
ISC
Version
1.0.8
Deps
2
Size
10 kB
Vulns
23
Weekly
0
Stars
1

authrocket

Installation

npm install useauthrocket

Usage

 import Authrocket from 'useauthrocket'
    
 const app = Authrocket.initializeApp({
           apiKey: <your api key>,
           appName: <your app name>
    })

Visit authrocket website to generate an api key. appName is the name of your application and can be anything

Available methods
  • createAccount
    • accepts:
      • email (string)
      • password (string)
      • payload (object)(optional)
    • returns: object
const user = app.createAccount(<email>, <password>, <payload>)
  • login
    • accepts:
      • email (string)
      • password (string)
    • returns: object
const user = app.login(<email>, <password>)
  • getUser
    • accepts:
      • uuid (string)
    • returns: object
const user = app.getUser(<uuid>)
  • isEmailVerified
    • accepts:
      • uuid (string)
    • returns: boolean
const isEmailVerified = app.isEmailVerified(<uuid>)
  • isUserLoggedIn
    • accepts:
      • uuid (string)
    • returns: boolean
const isUserSignedIn = app.isUserSignedIn(<uuid>)
  • signout
 app.signout()

Keywords