Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import React from 'react';
import PropTypes from 'prop-types';
import { signIn } from '../api/session';
class HandleSignIn extends React.Component {
componentDidMount() {
const url = window.location.href;
let email = JSON.parse(localStorage.getItem('emailForSignIn'));
if (!email) {
email = window.prompt('Please confirm your email.');
signIn(email, url, this.props.history);
render() {
return <h1>signing you in..</h1>;
HandleSignIn.propTypes = {
history: PropTypes.object.isRequired,
export default HandleSignIn;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.