# Function: randomState()

[💗 Help the project](https://github.com/sponsors/panva)

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by [becoming a sponsor](https://github.com/sponsors/panva).

***

▸ **randomState**(): `string`

Generates a random OAuth 2.0 `state` value.

## Returns

`string`

Random `state` value
