Created
June 24, 2018 08:33
-
-
Save AndrejGajdos/529c3d4d9e6cd161b7ccc59f8a3c80dd to your computer and use it in GitHub Desktop.
Method for logging with Facebook. The whole file is available https://github.com/AndrejGajdos/auth-flow-spa-node-react/blob/master/script/views/components/LoginForm/LoginForm.jsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
onFacebookLogin = () => { | |
const inOneHour = new Date(new Date().getTime() + 60 * 60 * 1000); | |
Cookies.set('lastLocation_before_logging', this.props.location.pathname, { expires: inOneHour }); | |
window.location.href = `${window.location.origin}/auth/facebook`; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment