File length: 20065
# References - Frontend SDKs - React SDK Reference - Passwordless
Source: https://supertokens.com/docs/references/frontend-sdks/supertokens-auth-react/recipe-passwordless
## Classes
### default
Defined in: [recipe/passwordless/index.ts:30](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/passwordless/index.ts#L30)
#### Constructors
##### Constructor
```ts
new default(): default;
```
###### Returns
[`default`](#default)
#### Properties
| Property | Modifier | Type | Default value | Defined in |
| ------ | ------ | ------ | ------ | ------ |
| `ComponentsOverrideProvider` | `static` | `any` | `RecipeComponentsOverrideContextProvider` | [recipe/passwordless/index.ts:196](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/passwordless/index.ts#L196) |
#### Methods
##### clearLoginAttemptInfo()
```ts
static clearLoginAttemptInfo(input?): Promise;
```
Defined in: [recipe/passwordless/index.ts:189](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/passwordless/index.ts#L189)
###### Parameters
| Parameter | Type |
| ------ | ------ |
| `input?` | \{ `userContext?`: [`UserContext`](types.mdx#usercontext-1); \} |
| `input.userContext?` | [`UserContext`](types.mdx#usercontext-1) |
###### Returns
`Promise`\<`void`\>
##### consumeCode()
```ts
static consumeCode(input?): Promise<
| {
createdNewRecipeUser: boolean;
fetchResponse: Response;
status: "OK";
user: User;
}
| {
failedCodeInputAttemptCount: number;
fetchResponse: Response;
maximumCodeInputAttempts: number;
status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR";
}
| {
fetchResponse: Response;
status: "RESTART_FLOW_ERROR";
}
| {
fetchResponse: Response;
reason: string;
status: "SIGN_IN_UP_NOT_ALLOWED";
}>;
```
Defined in: [recipe/passwordless/index.ts:84](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/passwordless/index.ts#L84)
###### Parameters
| Parameter | Type |
| ------ | ------ |
| `input?` | \| \{ `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types.mdx#usercontext-1); `userInputCode`: `string`; \} \| \{ `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types.mdx#usercontext-1); \} |
###### Returns
`Promise`\<
\| \{
`createdNewRecipeUser`: `boolean`;
`fetchResponse`: `Response`;
`status`: `"OK"`;
`user`: `User`;
\}
\| \{
`failedCodeInputAttemptCount`: `number`;
`fetchResponse`: `Response`;
`maximumCodeInputAttempts`: `number`;
`status`: `"INCORRECT_USER_INPUT_CODE_ERROR"` \| `"EXPIRED_USER_INPUT_CODE_ERROR"`;
\}
\| \{
`fetchResponse`: `Response`;
`status`: `"RESTART_FLOW_ERROR"`;
\}
\| \{
`fetchResponse`: `Response`;
`reason`: `string`;
`status`: `"SIGN_IN_UP_NOT_ALLOWED"`;
\}\>
##### createCode()
```ts
static createCode(input): Promise<
| {
deviceId: string;
fetchResponse: Response;
flowType: PasswordlessFlowType;
preAuthSessionId: string;
status: "OK";
}
| {
reason: string;
status: "SIGN_IN_UP_NOT_ALLOWED";
}>;
```
Defined in: [recipe/passwordless/index.ts:41](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/passwordless/index.ts#L41)
###### Parameters
| Parameter | Type |
| ------ | ------ |
| `input` | \| \{ `email`: `string`; `options?`: `RecipeFunctionOptions`; `shouldTryLinkingWithSessionUser?`: `boolean`; `userContext?`: [`UserContext`](types.mdx#usercontext-1); \} \| \{ `options?`: `RecipeFunctionOptions`; `phoneNumber`: `string`; `shouldTryLinkingWithSessionUser?`: `boolean`; `userContext?`: [`UserContext`](types.mdx#usercontext-1); \} |
###### Returns
`Promise`\<
\| \{
`deviceId`: `string`;
`fetchResponse`: `Response`;
`flowType`: `PasswordlessFlowType`;
`preAuthSessionId`: `string`;
`status`: `"OK"`;
\}
\| \{
`reason`: `string`;
`status`: `"SIGN_IN_UP_NOT_ALLOWED"`;
\}\>
##### doesEmailExist()
```ts
static doesEmailExist(input): Promise<{
doesExist: boolean;
fetchResponse: Response;
status: "OK";
}>;
```
Defined in: [recipe/passwordless/index.ts:131](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/passwordless/index.ts#L131)
###### Parameters
| Parameter | Type |
| ------ | ------ |
| `input` | \{ `email`: `string`; `options?`: `RecipeFunctionOptions`; `userContext?`: [`UserContext`](types.mdx#usercontext-1); \} |
| `input.email` | `string` |
| `input.options?` | `RecipeFunctionOptions` |
| `input.userContext?` | [`UserContext`](types.mdx#usercontext-1) |
###### Returns
`Promise`\<\{
`doesExist`: `boolean`;
`fetchResponse`: `Response`;
`status`: `"OK"`;
\}\>
##### doesPhoneNumberExist()
```ts
static doesPhoneNumberExist(input): Promise<{
doesExist: boolean;
fetchResponse: Response;
status: "OK";
}>;
```
Defined in: [recipe/passwordless/index.ts:146](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/passwordless/index.ts#L146)
###### Parameters
| Parameter | Type |
| ------ | ------ |
| `input` | \{ `options?`: `RecipeFunctionOptions`; `phoneNumber`: `string`; `userContext?`: [`UserContext`](types.mdx#usercontext-1); \} |
| `input.options?` | `RecipeFunctionOptions` |
| `input.phoneNumber` | `string` |
| `input.userContext?` | [`UserContext`](types.mdx#usercontext-1) |
###### Returns
`Promise`\<\{
`doesExist`: `boolean`;
`fetchResponse`: `Response`;
`status`: `"OK"`;
\}\>
##### getLinkCodeFromURL()
```ts
static getLinkCodeFromURL(input?): string;
```
Defined in: [recipe/passwordless/index.ts:117](https://github.com/supertokens/supertokens-auth-react/blob/b337b23722adfbe2906b193ea5fcf98f9c98c8b0/lib/ts/recipe/passwordless/index.ts#L117)
###### Parameters
| Parameter | Type |
| ------ | ------ |
| `input?` | \{ `userContext?`: [`UserContext`](types.mdx#usercontext-1); \} |
| `input.userContext?` | [`UserContext`](types.mdx#usercontext-1) |
###### Returns
`string`
##### getLoginAttemptInfo()
```ts
static getLoginAttemptInfo(input?): Promise