As a user, when I should be able to login using a Google login button
AC
WHEN the page loads I should see all boards
THEN click the Google Login button
AND and this will log me in
WIREFRAMES
DEV NOTES
1. Add the div id to index.html <div id="auth"></div>
2. Create a component auth.js
import firebase from 'firebase/app';
import 'firebase/auth';
3. create a event function:
const signMeIn = () =>{
const provider = new firebase.auth.GoogleAuthProvider();
firebase.auth().signInWithPopup(provider);
};
this is a local function and does not require export
4. In the auth.js component ensure have import utils from '../../helpers/utils';
5. In auth.js create a function to login :
const loginButton = () => {
const domString = '<button id = "google-auth" class = "btn btn-danger">GOOGLE
LOGIN</button>';
utils.printToDom('auth', domString);
$('#google-auth').click(signMeIn);
};
export default { loginButton};
USER STORY
As a user, when I should be able to login using a Google login button
AC
WHEN the page loads I should see all boards THEN click the Google Login button AND and this will log me in
WIREFRAMES
DEV NOTES
RELATED TICKETS
EX. #1