import React from 'react';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import { Security, ImplicitCallBack } from '@okta/okta-react';
import Header from 'components/Header';
import Signup from 'containers/Signup';
import HomePage from 'containers/HomePage';
const config = {
issuer: 'https://telegents.oktapreview.com/oauth2/default',
redirectUri: 'http://localhost:3000/implicit/callback',
clientId: 'xxxxxxxxxxx',
};
export default function App() {
return (
<div>
<Router>
<Security
issuer={config.issuer}
client_id={config.clientId}
redirect_uri={window.location.origin + '/implicit/callback'}
>
<Header />
<Route path="/implicit/callback" component={ImplicitCallBack} />
<Route exact path="/" component={HomePage} />
<Route path="/signup" component={Signup} />
</Security>
</Router>
</div>
);
}
I am able to successfully authenticate and receive the id_token back in the url as you can see below but I can not figure out why it is not matching the route path and updating local storage.
The only unique difference is I am using React Boilerplate for my project. However all other paths are matching.
http://localhost:3000/implicit/callback#id_token=eyJra … (edited )