Skip to content

Instantly share code, notes, and snippets.

@ruohki
Created November 2, 2018 08:27
Show Gist options
  • Save ruohki/ad9094da9f824ceb3e1862b64310ba32 to your computer and use it in GitHub Desktop.
Save ruohki/ad9094da9f824ceb3e1862b64310ba32 to your computer and use it in GitHub Desktop.
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