client.signInWithApiKeyAndSecret()
This method allows you to sign in using a key and secret.
Definition
client.signInWithApiKeyAndSecret(key: string,secret: string):Promise<Session,Error>
Parameters
Parameter | Type | Description |
---|---|---|
key | string | An authentication key |
secret | string | An authentication secret |
Returns
An error will be thrown if any of the arguments are invalid.
Otherwise, once the returned Promise
is resolved, we will have access to an object containing authentication and user information.
Property | Type | Description |
---|---|---|
auth | Object | Authentication details |
user | Object | Partial User with some fields missing |
Auth
Property | Type | Description |
---|---|---|
key | string | An authentication key |
secret | string | An authentication secret |
resource | string | The generated resource token |
Examples
const { user } = await client.signInWithApiKeyAndSecret('myKey','mySecret',{udid: '3bc656cc-025b-49d1-aacf-ddf1b22a3a4b'});console.log(user.displayName);