# Auth

**Kind**: interface | **Module**: [io.Connect Desktop](https://docs.interop.io/desktop/reference/javascript/io.connect%20desktop/index.md)

**Source**: https://docs.interop.io/desktop/reference/javascript/io.connect desktop/auth/index.html

Authentication can use one of the following flows:
* username/password;
* `token` - access tokens can be generated after successful login from the Auth Provider (e.g., Auth0);
* `gatewayToken` - Gateway tokens are time limited tokens generated by the Gateway after an explicit request. To generate one, use the `io.connection.authToken()` method;
* `sspi` - using `sessionId` and authentication challenge callback;

## Properties

- **`flowCallback`** (`(sessionId: string, token: any) => Promise<{ data: any }>`, optional)
- **`flowName`** (`"sspi"`, optional)
- **`gatewayToken`** (`string`, optional)
  Authenticate using gatewayToken
- **`password`** (`string`, optional)
  Password to be used
- **`provider`** (`string`, optional)
  GW auth provider to be used
- **`providerContext`** (`any`, optional)
  A context object, which will be passed along to the GW auth provider to be used to request verification
- **`sessionId`** (`string`, optional)
- **`token`** (`string`, optional)
  Authenticate using token generated from the auth provider.
- **`username`** (`string`, optional)
  Username to be used
