-
Notifications
You must be signed in to change notification settings - Fork 621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AD - Update React Redirect #5236
base: master
Are you sure you want to change the base?
Conversation
Netlify Preview URL for the changes: https://preview-5236--reverent-murdock-829d24.netlify.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made the same updates here in this PR's commit as I did with the suggested changes. The profile route I had to add only to the original PR.
<> | ||
<Security oktaAuth={oktaAuth} restoreOriginalUri={restoreOriginalUri}> | ||
<Switch> | ||
<Routes> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Routes> |
Leaving Routes
there is an accident
<Routes> | ||
<Route path="/" exact component={Home}/> | ||
<Route path="/login/callback" component={LoginCallback}/> | ||
</Routes> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
</Routes> |
sorry, no Routes
@@ -1,12 +1,23 @@ | |||
You need recent versions of [Node](https://nodejs.org/en/) and [npm](https://www.npmjs.com/). | |||
|
|||
Create a React app named `okta-react-quickstart` and enter the project route using the following command. This creates a React app using React version 17. | |||
1. Create a Vue app named `okta-react-quickstart` using the following command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Create a Vue app named `okta-react-quickstart` using the following command: | |
1. Create a React app named `okta-react-quickstart` using the following command: |
oops, that's awkward
<p> | ||
Below is the information from your ID token which was obtained during the | ||
<a href="https://developer.okta.com/docs/guides/implement-auth-code-pkce">PKCE Flow</a> | ||
{' '} | ||
and is now stored in local storage. | ||
</p> | ||
<p> | ||
TRUE? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TRUE? |
} | ||
} | ||
const { oktaAuth } = useOktaAuth(); | ||
const [messages, setMessages] = useState(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const [messages, setMessages] = useState(null); | |
const [messages, setMessages] = useState([]); |
}; | ||
|
||
fetchMessages(); | ||
}, [oktaAuth]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
}, [oktaAuth]); | |
}, [oktaAuth, messages.length]); |
``` | ||
|
||
4. Import `Profile` into `src/App.js` by adding the following: | ||
4. Import `Profile` into `src/App.jsx` by adding the following: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add text about adding a link to /profile
similar to what we discussed for Angular
<p> | ||
Below is the information from your ID token which was obtained during the | ||
<a href="https://developer.okta.com/docs/guides/implement-auth-code-pkce">PKCE Flow</a> | ||
{' '} | ||
and is now stored in local storage. | ||
</p> | ||
<p> | ||
TRUE? | ||
This route is protected with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This route is protected with the | |
Protect this route with the |
Description:
Resolves: