as a user when i load the page I should be able to log in and out
acceptance criteria
when i load the page upon first visit
then i should see google login button and authenticate on navbar
then if i click google login button, i should see a popup asking me to choose my gmail
then once i log in, google login/authenticate will hide and movies div/logout will show
then if i log out, movies div/logout will hide, and google login/authenticate will show again
development
grab a navbar code from bootstrap, and modify to have an authentication, movies, and logout buttons
create a firebase project called movie-history and get firebase config information
in src/javascripts/helpers create a fbconfig.json file that holds the reference keys, import that file to main .js and run firebase.initializeapp() and pass in fbconfig info
in src/javascripts/components create auth.js file,
in auth.js file create function called attachLoginEvents and export the function to main.js
attachLoginEvents will attach a click event on google login button
when clicking on login button, create a provider variable and assign it firebase google provider
then run login with popup firebase auth method,
create authData.js file in scr/javascripts/helpers/data
in authData.js create checkLoginStatus function, and export it to main and run it after attachLoginEvents
in checkLoginStatus handle the hiding and showing of elements upon login/logout
user story
as a user when i load the page I should be able to log in and out
acceptance criteria
when i load the page upon first visit then i should see google login button and authenticate on navbar then if i click google login button, i should see a popup asking me to choose my gmail then once i log in, google login/authenticate will hide and movies div/logout will show then if i log out, movies div/logout will hide, and google login/authenticate will show again
development
grab a navbar code from bootstrap, and modify to have an authentication, movies, and logout buttons
create a firebase project called movie-history and get firebase config information
in src/javascripts/helpers create a fbconfig.json file that holds the reference keys, import that file to main .js and run firebase.initializeapp() and pass in fbconfig info
in src/javascripts/components create auth.js file,
in auth.js file create function called attachLoginEvents and export the function to main.js
attachLoginEvents will attach a click event on google login button
when clicking on login button, create a provider variable and assign it firebase google provider
then run login with popup firebase auth method,
create authData.js file in scr/javascripts/helpers/data
in authData.js create checkLoginStatus function, and export it to main and run it after attachLoginEvents
in checkLoginStatus handle the hiding and showing of elements upon login/logout