@mycure/sdk
v5.9.2
Published
mycure sdk-web
Downloads
38
Readme
Mycure sdk-web
Installation and Usage
$ yarn add firebase socket.io-client @mycure/sdk
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: '[email protected]', password: 'password' })