<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [signInWithCredential](./auth.signinwithcredential.md)

## signInWithCredential() function

Asynchronously signs in with the given credentials.

<b>Signature:</b>

```typescript
export declare function signInWithCredential(auth: Auth, credential: AuthCredential): Promise<UserCredential>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  auth | [Auth](./auth.auth.md) | The Auth instance. |
|  credential | [AuthCredential](./auth.authcredential.md) | The auth credential. |

<b>Returns:</b>

Promise&lt;[UserCredential](./auth.usercredential.md)<!-- -->&gt;

## Remarks

An [AuthProvider](./auth.authprovider.md) can be used to generate the credential.

