christopherjohnson1 / star-destroyer-nutshell

0 stars 0 forks source link

authentication #2

Closed christopherjohnson1 closed 4 years ago

christopherjohnson1 commented 4 years ago

User Story

AC

WHEN the page loads and the user is unauthenticated, THEN the dashboard will display with READ ONLY information, AND there will be a login via google button displayed

WHEN the page loads and the user logs in via google, THEN the dashboard will display with all necessary information, THEN the user will have the ability to add, edit, and delete information, AND the user will be able to logout

Dev Notes

Create apiKeys.json file-add this file to .gitignore Create apiKeys.example.json file Grab apiKeys from firebase Create authData.js file -import firebase -import firebase/auth -create function that checks the login status using firebase method -create if and else statements that contain what should appear when logged in or out -add button class="btn btn-danger" id="logout-button" to Navbar in index.html Create auth.js file -create signIn function for click event -create domString for login button class="btn btn-danger" id="login-button" Create main.js file -initialize firebase app -call loginButton function -call checkLoginStatus function