Open Accounts

Opens the accounts page in the app.

Description

The openAccounts() action navigates the user to the native accounts page inside the app.

Function Signature

await Superfans.actions.openAccounts();
ParameterTypeRequiredDescription
NilNilNilThis action does not require any parameter.

Structure of Response

StatusResponse
Success{ "status": "success", "message": "Accounts page opened successfully" }
Unexpected Error{ "status": "error", "errorId": 500, "errorHandle": "unknown-error", "message": "Something unexpected happened" }

Example Usage

await Superfans.actions.openAccounts();

Best Practices

  1. Use this from a profile icon or account dashboard CTA.
  2. If the user must be logged in, check Superfans.variables.customer first and call openAuthentication when needed.

Caveats

  1. This action opens the native accounts screen; it does not log the user in or out.
  2. Logged-out users may be redirected to login depending on app configuration.

Did this page help you?