---
url: "https://vueda.dev/v3/reference/api/js/stores/storeUser/methods/getRecoveryCodes.md"
title: "getRecoveryCodes"
---

# getRecoveryCodes

## Overview

Fetches the signed-in user's recovery codes, and generates them when the user has none.
Before rejecting with an `UnauthorizedError`, refetches the current user, so `authPendingFlow` names the flow
that the server now requires.

## Signature

`getRecoveryCodes()`

### Returns

`Promise`

The allauth response, whose `data.unused_codes` lists the unused codes.

## Source

`client/lib/stores/storeUser.js:855`
