# login

> **login**(`client`, `options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`` `0x${string}` ``\>

Defined in: [packages/synapse-core/src/session-key/login.ts:50](https://github.com/FilOzone/synapse-sdk/blob/7fdc04df4e3c52366a9f0cd55da4c05e20b2ed82/packages/synapse-core/src/session-key/login.ts#L50)

Authorize a session key with permissions until expiry.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `client` | `Client`\<`Transport`, `Chain`, `Account`\> | The client to use to authorize the session key. |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/session-key/namespaces/login/type-aliases/optionstype/) | [login.OptionsType](/reference/filoz/synapse-core/session-key/namespaces/login/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<`` `0x${string}` ``\>

The transaction hash [login.OutputType](/reference/filoz/synapse-core/session-key/namespaces/login/type-aliases/outputtype/)

## Throws

Errors [login.ErrorType](/reference/filoz/synapse-core/session-key/namespaces/login/type-aliases/errortype/)