Skip to main content
These methods concern the currently signed-in member. See Members and authentication for how a member becomes signed in.

member.current()

Synchronously return the cached member profile.
Returns the Member if one has been fetched since page load, otherwise null. Note that null doesn’t necessarily mean signed out: on a returning visit the token is present immediately, but the profile is fetched in the background. Use auth:change to be notified when it arrives.

member.get()

Fetch the member profile from the API.
Returns null immediately if no token is stored. Otherwise fetches /v1/member, updates the cache (emitting auth:change if the member changed), and resolves with the Member. Rejects with an SdkApiError if the API fails — typically 401 for an expired token.
You rarely need to call this yourself. The SDK calls it during initialisation when a token exists, and after auth.signIn() succeeds.

member.activity()

Fetch the member’s recent cashback transactions.
number
Maximum number of items to return.
number
default:"0"
Number of items to skip, for pagination.
Returns
ActivityItem[]
Transactions, most recent first. See ActivityItem.
number
Total number of transactions.
Throws synchronously with [CashbackHive] member is not signed in if no token is stored. Check auth.isSignedIn() first.