---
# System prepended metadata

title: AXO Returning Buyer Integration

---

# AXO Remembered User Integration

## Definitions
- Remembered User: A buyer that has an existing session- if a buyer previously authenticated and navigated back to the checkout page within a single session.
- Method-based integration: An integration pattern where a merchant owns their own UI fields, specifically the email address field.
## Overview
If a merchant is using a method-based integration they currently do not have the ability to distinguish a remembered buyer. If a buyer refreshed or navigated away from the checkout page and then back, the merchant would continue to render an email address input field. The desired behavior is to have some ability to know that a buyer is "recognized" and that the merchant does not need to use the existing flow to authenticate the user to get back the profile.

### Integration
```javascript
const { authenticationState, profileData} = await identity.getRememberedBuyerProfile();
if (authenticationState === 'succeeded') {
  renderBuyerProfile(profileData);
} else {
  // We don't have a remembered buyer, we should bind to the email field & trigger auth manually
}
```

After the buyer completes checkout, we should have some sort of cleanup step
```javascript
identity.forgetUser();
connectSession.cleanup();
connectSession.complete();
```