Skip to content

Commit c7938ff

Browse files
authored
Merge beta sample into master (#319)
1 parent ca85bc4 commit c7938ff

File tree

4 files changed

+191
-218
lines changed

4 files changed

+191
-218
lines changed

Sample-01/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"prod": "npm-run-all --parallel server api-server"
1717
},
1818
"dependencies": {
19-
"@auth0/auth0-react": "^1.12",
19+
"@auth0/auth0-react": "^2.0.0",
2020
"@babel/core": "^7.20",
2121
"@babel/plugin-syntax-flow": "^7.18",
2222
"@babel/plugin-transform-react-jsx": "^7.20",

Sample-01/src/components/NavBar.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ const NavBar = () => {
3232

3333
const logoutWithRedirect = () =>
3434
logout({
35-
returnTo: window.location.origin,
35+
logoutParams: {
36+
returnTo: window.location.origin,
37+
}
3638
});
3739

3840
return (

Sample-01/src/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ const config = getConfig();
2020
const providerConfig = {
2121
domain: config.domain,
2222
clientId: config.clientId,
23-
...(config.audience ? { audience: config.audience } : null),
24-
redirectUri: window.location.origin,
2523
onRedirectCallback,
24+
authorizationParams: {
25+
redirect_uri: window.location.origin,
26+
...(config.audience ? { audience: config.audience } : null),
27+
},
2628
};
2729

2830
ReactDOM.render(

0 commit comments

Comments
 (0)