Skip to main content

Auth

@coinbase/waas-sdk-web • API


Interface: Auth

Namespace for managing user authentication.

Extends​

  • HasApi

Properties​

api​

api: Api

Inherited from​

HasApi.api


user?​

optional user: User

The current user, if logged in.

Methods​

login()​

login(options?): Promise<User>

Login the user to WaaS using the provided options. When the options include a valid provideAuthToken lambda that issues tokens using the auth package's issueUserToken, the user will be logged in using that token.

Parameters​

• options?: LoginOptions

See LoginOptions

Returns​

Promise<User>

A promise that returns a user object after they are logged in.


logout()​

logout(): Promise<void>

Logout the user.

Returns​

Promise<void>

Was this helpful?