npm install firebase
npm install --save ra-auth-firebase-client
import { Admin, Resource } from 'react-admin'
import {emailAndPasswordAuthProvider} from "ra-auth-firebase-client";
import { PostList, PostEdit, PostCreate } from './Posts'
import dataProvider from 'your-data-provider';
import firebase from 'firebase/app'
import 'firebase/auth'
firebase.initializeApp({
apiKey: '**************',
authDomain: '**************',
databaseURL: 'https://myrealtimedatabase.firebaseio.com',
projectId: 'myrealtimedatabase',
storageBucket: 'myrealtimedatabase.appspot.com',
messagingSenderId: '**************',
appId: '**************',,
measurementId: '**************'
})
export default () =>
<Admin authProvider={emailAndPasswordAuthProvider(firebase)} dataProvider={dataProvider} >
<Resource name='posts' list={PostList} edit={PostEdit} create={PostCreate} />
</Admin>
console.log(localStorage.getItem("user"))
https://aymendhaya.github.io/ra-auth-firebase-client
- this is a basic migration to v3
- a lot of functionalities will be added soon
- please feel free to suggest new functionnalities
Firebase dataProvider is a separate project. Check ra-data-firebase-client