# IdentityAttributesManager

Defined in: [react/src/auth/identity-attributes-manager.ts:32](https://github.com/B3Pay/ic-reactor/blob/70bedf3c8779611a3b35710510442dee7f630b87/packages/react/src/auth/identity-attributes-manager.ts#L32)

Requests and decodes signed identity attributes for an authenticated
Internet Identity session.

Await `authentication.prepareClient()` once during startup (the `useAuth`
hook already does) so that [request](#request) can open the identity provider
window synchronously from a click handler.

## Example

```ts
const attributes = new IdentityAttributesManager(authentication)
const result = await attributes.request({
  keys: ["name"],
  nonce: () => fetchNonceFromCanister(),
})
```

## Constructors

### Constructor

> **new IdentityAttributesManager**(`authentication`): `IdentityAttributesManager`

Defined in: [react/src/auth/identity-attributes-manager.ts:33](https://github.com/B3Pay/ic-reactor/blob/70bedf3c8779611a3b35710510442dee7f630b87/packages/react/src/auth/identity-attributes-manager.ts#L33)

#### Parameters

##### authentication

[`AuthenticationManager`](https://ic-reactor.b3pay.net/v3/libs/classes/authenticationmanager/)

#### Returns

`IdentityAttributesManager`

## Properties

### authentication

> `readonly` **authentication**: [`AuthenticationManager`](https://ic-reactor.b3pay.net/v3/libs/classes/authenticationmanager/)

Defined in: [react/src/auth/identity-attributes-manager.ts:33](https://github.com/B3Pay/ic-reactor/blob/70bedf3c8779611a3b35710510442dee7f630b87/packages/react/src/auth/identity-attributes-manager.ts#L33)

## Methods

### request()

> **request**(`__namedParameters`): `Promise`\<[`IdentityAttributeResult`](https://ic-reactor.b3pay.net/v3/libs/interfaces/identityattributeresult/)\>

Defined in: [react/src/auth/identity-attributes-manager.ts:35](https://github.com/B3Pay/ic-reactor/blob/70bedf3c8779611a3b35710510442dee7f630b87/packages/react/src/auth/identity-attributes-manager.ts#L35)

#### Parameters

##### \_\_namedParameters

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

#### Returns

`Promise`\<[`IdentityAttributeResult`](https://ic-reactor.b3pay.net/v3/libs/interfaces/identityattributeresult/)\>

***

### requestOpenId()

> **requestOpenId**(`__namedParameters`): `Promise`\<[`IdentityAttributeResult`](https://ic-reactor.b3pay.net/v3/libs/interfaces/identityattributeresult/)\>

Defined in: [react/src/auth/identity-attributes-manager.ts:103](https://github.com/B3Pay/ic-reactor/blob/70bedf3c8779611a3b35710510442dee7f630b87/packages/react/src/auth/identity-attributes-manager.ts#L103)

#### Parameters

##### \_\_namedParameters

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

#### Returns

`Promise`\<[`IdentityAttributeResult`](https://ic-reactor.b3pay.net/v3/libs/interfaces/identityattributeresult/)\>