1.0.1 • Published 1 year ago

firebase-auth-wrapper v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Usage

Step 1: Install Package

npm install firebase-auth-wrapper

Step 2: Usage Using Wrapper

Then, you can use the AuthProvider in your React application by passing your Firebase configuration:

import React from 'react';
import { AuthProvider, useAuth } from 'firebase-auth-wrapper';

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"
};

function App() {
  const { currentUser } = useAuth();
  return (
    <AuthProvider firebaseConfig={firebaseConfig}>
      <div>
        {currentUser ? `Logged in as ${currentUser.email}` : "Not logged in"}
      </div>
    </AuthProvider>
  );
}
export default App;
1.0.1

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago

1.0.0

1 year ago