Skip to content

Commit

Permalink
Merge pull request #4 from Jadugars/login
Browse files Browse the repository at this point in the history
Merging, no need of review. Focus on #1
  • Loading branch information
kronaemmanuel committed Nov 28, 2020
2 parents 241c6a1 + 3301d7e commit 69c4f57
Show file tree
Hide file tree
Showing 11,611 changed files with 1,748 additions and 1,224,367 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

# next
.next
6 changes: 6 additions & 0 deletions config/firebase/context.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React from "react";
import Firebase from "./firebase";

const FirebaseContext = React.createContext(new Firebase());

export default FirebaseContext;
42 changes: 42 additions & 0 deletions config/firebase/firebase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import firebase from "firebase";
import "firebase/auth";

var config = {
apiKey: process.env.NEXT_PUBLIC_API_KEY,
authDomain: process.env.NEXT_PUBLIC_AUTH_DOMAIN,
databaseURL: process.env.NEXT_PUBLIC_DATABASE_URL,
projectId: process.env.NEXT_PUBLIC_PROJECT_ID,
storageBucket: process.env.NEXT_PUBLIC_STORAGE_BUCKET,
messagingSenderId: process.env.NEXT_PUBLIC_MESSAGING_SENDER_ID,
appId: process.env.NEXT_PUBLIC_APP_ID,
};

class Firebase {
constructor() {
if (!firebase.apps.length) {
firebase.initializeApp(config);
}
}

createUser = (email, password) =>
firebase.auth().createUserWithEmailAndPassword(email, password);

verifyUser = (userCredential) => {
userCredential.user
.sendEmailVerification()
.then(function () {
console.log("Verification Email sent");
})
.catch(function (error) {
console.error("Error sending verification email: ", error);
});
};

signInUser = (email, password) =>
firebase.auth().signInWithEmailAndPassword(email, password);

handleVerifyEmail = (actionCode) =>
firebase.auth().applyActionCode(actionCode);
}

export default Firebase;
1 change: 0 additions & 1 deletion node_modules/.bin/acorn

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/atob

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/browserslist

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/cssesc

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/detect-libc

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/errno

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/he

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/json5

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/loose-envify

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/miller-rabin

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/mkdirp

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/nanoid

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/next

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/prebuild-install

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/rc

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/rimraf

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/semver

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/sha.js

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/terser

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/.bin/webpack

This file was deleted.

1,431 changes: 0 additions & 1,431 deletions node_modules/.yarn-integrity

This file was deleted.

5 changes: 0 additions & 5 deletions node_modules/@ampproject/toolbox-core/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions node_modules/@ampproject/toolbox-core/index.js

This file was deleted.

1 change: 0 additions & 1 deletion node_modules/@ampproject/toolbox-core/lib/.gitignore

This file was deleted.

103 changes: 0 additions & 103 deletions node_modules/@ampproject/toolbox-core/lib/FileSystemCache.js

This file was deleted.

39 changes: 0 additions & 39 deletions node_modules/@ampproject/toolbox-core/lib/IsAmp.js

This file was deleted.

Loading

0 comments on commit 69c4f57

Please sign in to comment.