Methods to authenticate a customer's account and get information about their current session.

Use to authenticate a customer with their email address and password. If the email/password combo is correct, their account will be added to the session, making customer-specific methods available. This will set account_logged_in=true and guest=false.

Log in
await swell.account.login('', 'thepassword')

Use to disconnect the account from the current session. This will set account_logged_in=false and guest=true.

Log out
await swell.account.logout()

Use to get information about the customer currently logged in.

Returns the account object, or null if the customer is not logged in.

Get logged in account
await swell.account.get()