![npm (scoped)](https://img.shields.io/npm/v/@hyperobjekt/spi-auth)

# @hyperobjekt/spi-auth

## Installation

```sh
npm i @hyperobjekt/spi-auth
# or
yarn @hyperobjekt/spi-auth
```

## Usage

```jsx
import { SpiAuth, EmailActionHandler, signOut, logEvent } from "@hyperobjekt/spi-auth";

const App = () => (
  <>
    <SpiAuth {...props} />
    <EmailActionHandler />
    <button onClick={signOut} />
  </>
);
```

### logEvent
Wrapper for [logEvent](https://firebase.google.com/docs/analytics/events?platform=web) from the Firebase SDK

```js
logEvent('custom_event', {
  property1: 'foo',
  property2: 'bar'
});
```


### \<SpiAuth />

| Property       | Type   | Default | Description                       |
| -------------- | ------ | ------- | --------------------------------- |
| `description?` | String | `""`    | Introduction text for login modal |

### \<EmailActionHandler />

| Property | Type | Default | Description |
| -------- | ---- | ------- | ----------- |
| _none_   |      |         |             |
