Skip to content

palashshah110/refine-firebase-adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

refine-firebase-adapter

A custom data and auth provider using Firebase for Refine.

Table of Contents

Installation

To install the package, run:

npm install refine-firebase-adapter

Configuration

Initialize Firebase in your application's entry point (e.g., index.js or App.js):

import { initializeFirebase } from 'refine-firebase-adapter';

// Define your Firebase configuration
const firebaseConfig = {
    apiKey: 'YOUR_API_KEY',
    authDomain: 'YOUR_AUTH_DOMAIN',
    projectId: 'YOUR_PROJECT_ID',
    storageBucket: 'YOUR_STORAGE_BUCKET',
    messagingSenderId: 'YOUR_MESSAGING_SENDER_ID',
    appId: 'YOUR_APP_ID'
};

// Initialize Firebase
const { auth, db } = initializeFirebase(firebaseConfig);

// Now you can use `auth` and `db` in your application
console.log(auth, db);

Usage

To use the data and auth providers in your project, import them and pass them to the Refine component:

import React from "react";
import { Refine } from "@refinedev/core";
import { authprovider, dataprovider } from "refine-firebase-adapter";

const App = () => {
    return (
        <Refine
            dataProvider={dataprovider}
            authProvider={authprovider}
        />
    );
};

export default App;

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

This README.md will help users understand how to install, configure, and use your package effectively. Make sure to replace refine-firebase-adapter with the actual package name you decide to use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published