Skip to content

Commit

Permalink
Export AppState type for custom onredirectCallbacks's
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjmcgrath committed Sep 23, 2020
1 parent 42964e8 commit a4c5f67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/cra-react-router/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import ReactDOM from 'react-dom';
import App, { history } from './App';
import { Auth0Provider } from '@auth0/auth0-react';
import { Auth0Provider, AppState } from '@auth0/auth0-react';

const onRedirectCallback = (appState: any) => {
const onRedirectCallback = (appState: AppState) => {
// If using a Hash Router, you need to use window.history.replaceState to
// remove the `code` and `state` query parameters from the callback url.
// window.history.replaceState({}, document.title, window.location.pathname);
Expand Down
1 change: 1 addition & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export {
default as Auth0Provider,
Auth0ProviderOptions,
AppState,
} from './auth0-provider';
export { default as useAuth0 } from './use-auth0';
export { default as withAuth0, WithAuth0Props } from './with-auth0';
Expand Down

0 comments on commit a4c5f67

Please sign in to comment.