# UseAuthReturn

Defined in: [react/src/hooks/createAuthHooks.ts:8](https://github.com/B3Pay/ic-reactor/blob/ad82a03d03149c25f0d0f63e453f62e284c28b02/packages/react/src/hooks/createAuthHooks.ts#L8)

## Properties

### authenticate

> **authenticate**: () => `Promise`\<`Identity` \| `undefined`\>

Defined in: [react/src/hooks/createAuthHooks.ts:9](https://github.com/B3Pay/ic-reactor/blob/ad82a03d03149c25f0d0f63e453f62e284c28b02/packages/react/src/hooks/createAuthHooks.ts#L9)

#### Returns

`Promise`\<`Identity` \| `undefined`\>

***

### login

> **login**: (`options?`) => `Promise`\<`void`\>

Defined in: [react/src/hooks/createAuthHooks.ts:10](https://github.com/B3Pay/ic-reactor/blob/ad82a03d03149c25f0d0f63e453f62e284c28b02/packages/react/src/hooks/createAuthHooks.ts#L10)

#### Parameters

##### options?

[`AuthenticationSignInOptions`](https://ic-reactor.b3pay.net/v3/libs/interfaces/authenticationsigninoptions/)

#### Returns

`Promise`\<`void`\>

***

### logout

> **logout**: (`options?`) => `Promise`\<`void`\>

Defined in: [react/src/hooks/createAuthHooks.ts:11](https://github.com/B3Pay/ic-reactor/blob/ad82a03d03149c25f0d0f63e453f62e284c28b02/packages/react/src/hooks/createAuthHooks.ts#L11)

#### Parameters

##### options?

###### returnTo?

`string`

#### Returns

`Promise`\<`void`\>

***

### isAuthenticated

> **isAuthenticated**: `boolean`

Defined in: [react/src/hooks/createAuthHooks.ts:12](https://github.com/B3Pay/ic-reactor/blob/ad82a03d03149c25f0d0f63e453f62e284c28b02/packages/react/src/hooks/createAuthHooks.ts#L12)

***

### isAuthenticating

> **isAuthenticating**: `boolean`

Defined in: [react/src/hooks/createAuthHooks.ts:20](https://github.com/B3Pay/ic-reactor/blob/ad82a03d03149c25f0d0f63e453f62e284c28b02/packages/react/src/hooks/createAuthHooks.ts#L20)

`true` while a sign-in or sign-out is in progress, and until the session
restore the first `useAuth()` starts has settled: on the first render, in
a server render and while the stored session is read. A restore that fails
settles it too. Show a loading state while it is `true` rather than
treating `isAuthenticated: false` as signed out.

***

### principal

> **principal**: `Principal` \| `null`

Defined in: [react/src/hooks/createAuthHooks.ts:26](https://github.com/B3Pay/ic-reactor/blob/ad82a03d03149c25f0d0f63e453f62e284c28b02/packages/react/src/hooks/createAuthHooks.ts#L26)

The signed-in user's principal, or `null` while signed out. A signed-out
session still holds an anonymous `identity`, and its principal is not
returned here.

***

### identity

> **identity**: `Identity` \| `null`

Defined in: [react/src/hooks/createAuthHooks.ts:27](https://github.com/B3Pay/ic-reactor/blob/ad82a03d03149c25f0d0f63e453f62e284c28b02/packages/react/src/hooks/createAuthHooks.ts#L27)

***

### error

> **error**: `Error` \| `undefined`

Defined in: [react/src/hooks/createAuthHooks.ts:28](https://github.com/B3Pay/ic-reactor/blob/ad82a03d03149c25f0d0f63e453f62e284c28b02/packages/react/src/hooks/createAuthHooks.ts#L28)