Skip to content

Commit b520879

Browse files
committed
rollback wrapper
1 parent fc441b3 commit b520879

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

01-Login/src/react-auth0-spa.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import React, { useState, useEffect, useContext } from "react";
22
import createAuth0Client from "@auth0/auth0-spa-js";
3-
import history from "./utils/history";
3+
44

55
const DEFAULT_REDIRECT_CALLBACK = () =>
6-
history.push(window.location.pathname);
6+
window.history.replaceState({}, document.title, window.location.pathname);
77

88
export const Auth0Context = React.createContext();
99
export const useAuth0 = () => useContext(Auth0Context);

02-Calling-an-API/src/react-auth0-spa.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import createAuth0Client from "@auth0/auth0-spa-js";
33
import history from "./utils/history";
44

55
const DEFAULT_REDIRECT_CALLBACK = () =>
6-
history.push(window.location.pathname);
6+
window.history.replaceState({}, document.title, window.location.pathname);
77

88
export const Auth0Context = React.createContext();
99
export const useAuth0 = () => useContext(Auth0Context);

0 commit comments

Comments
 (0)