# StorageLike (/docs/auth/api/interfaces/StorageLike)



[@kysoql/auth](/docs/auth/api) / StorageLike

Subset of the Web Storage API required by the local-storage token store.

## Methods [#methods]

<a id="api-getitem" />

### getItem() [#getitem]

```ts
getItem(key): string | null;
```

Reads a value from the backing Web Storage implementation.

#### Parameters [#parameters]

| Parameter | Type     |
| --------- | -------- |
| `key`     | `string` |

#### Returns [#returns]

`string` | `null`

***

<a id="api-setitem" />

### setItem() [#setitem]

```ts
setItem(key, value): void;
```

Writes a value to the backing Web Storage implementation.

#### Parameters [#parameters-1]

| Parameter | Type     |
| --------- | -------- |
| `key`     | `string` |
| `value`   | `string` |

#### Returns [#returns-1]

`void`

***

<a id="api-removeitem" />

### removeItem() [#removeitem]

```ts
removeItem(key): void;
```

Removes a value from the backing Web Storage implementation.

#### Parameters [#parameters-2]

| Parameter | Type     |
| --------- | -------- |
| `key`     | `string` |

#### Returns [#returns-2]

`void`
