# Mycure sdk-web

## Installation and Usage

```sh
$ yarn add firebase socket.io-client @mycure/sdk
```

```javascript
import sdk from '@mycure/sdk';
import socket from 'socket.io-client';
// import { connect as socket } from 'nativescript-socketio'; // for nativescript
import firebase from 'firebase';

// initialize the sdk
sdk.initilize('http://mcv4.herokuapp.com', {
  socket,
  firebaseApp: firebase.initializeApp({ // <-- pass already initialized firebaseApp
    // ...config here
  })
});

// observe the current user
sdk.auth().currentUser$.subscribe(console.log);

// signin
await sdk.auth().signin('local', { email: 'test@mycure.md', password: 'password' })
```
