Created
November 2, 2018 08:27
-
-
Save ruohki/ad9094da9f824ceb3e1862b64310ba32 to your computer and use it in GitHub Desktop.
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
import React, { Component } from "react"; | |
import { Redirect } from "react-router-dom"; | |
import auth0Client from "./Auth"; | |
class Callback extends Component { | |
state = { | |
loading: true | |
} | |
componentDidMount() { | |
auth0Client.handleAuthentication().then(() => this.setState({ loading: false })); | |
} | |
render() { | |
return this.state.loading ? ( | |
<p>Loading profile...</p> | |
) : ( | |
<Redirect to="/" /> | |
); | |
} | |
} | |
export default Callback; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment