Auth
Use Auth
module to handle authentication.
By default
Auth
is using SRP authenticationAuth
stores tokens inStorage
implementationStorage
defaults to localStorage on web & memoryStorage on nodeJsStorage
implementation can be configured withAuth.configure({ storage: window.sessionStorage })
Auth
is automatically refreshing tokens in SRP modeOn server side it is recommended to use API keys:
Auth.configure({ apiKey: 'your_api_key' })
API key: can be generated over web app & over CLI
Short-lived token with refresh
API key
Self-managed auth token
signIn(email, password)
email
(string
, required)password
(string
, required)returns
Promise<{ wallet, jwt }>
- Promise with JWT token & Akord Wallet
signUp(email, password)
email
(string
, required)password
(string
, required)clientMetadata
(any
, optional) - JSON client metadata, ex: { clientType: "CLI" }returns
Promise<AkordWallet>
- Promise with Akord Wallet
verifyAccount(email, code)
email
(string
, required)code
(string
, required)returns
Promise<void>
Last updated