<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@firebase/auth](./auth.md) &gt; [useAuthEmulator](./auth.useauthemulator.md)

## useAuthEmulator() function

Changes the Auth instance to communicate with the Firebase Auth Emulator, instead of production Firebase Auth services.

<b>Signature:</b>

```typescript
export declare function useAuthEmulator(auth: Auth, url: string, options?: {
    disableWarnings: boolean;
}): void;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  auth | [Auth](./auth.auth.md) | The Auth instance. |
|  url | string | The URL at which the emulator is running (eg, 'http://localhost:9099'). |
|  options | { disableWarnings: boolean; } |  |

<b>Returns:</b>

void

## Remarks

This must be called synchronously immediately following the first call to [initializeAuth()](./auth.initializeauth.md)<!-- -->. Do not use with production credentials as emulator traffic is not encrypted.

## Example


```javascript
useAuthEmulator(auth, 'http://127.0.0.1:9099', { disableWarnings: true });

```

