# Sample using React Router V7 (SPA)

**URL:** <https://devforum.okta.com/t/sample-using-react-router-v7-spa/34286>\
**Category:** OAuth/OIDC\
**Tags:** reactjs, react\
**Created:** [September 4, 2025, 1:23am UTC](https://devforum.okta.com/t/sample-using-react-router-v7-spa/34286 "2025-09-04T01:23:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dkpsthomas](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dkpsthomas](https://devforum.okta.com/u/dkpsthomas)\
**Post date:** [September 4, 2025, 1:23am UTC](https://devforum.okta.com/t/sample-using-react-router-v7-spa/34286/1 "2025-09-04T01:23:03Z")

</div>

Are there any samples integrating OKTA on a SPA app using react router V7. My company already has OKTA integrated on .net core MVC app. This is the first time we are trying on a react app.

---

<div class="post-metadata">

**Author:** ![alisaduncan](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/alisaduncan/32/3429_2.png) [@alisaduncan](https://devforum.okta.com/u/alisaduncan)\
**Post date:** [September 4, 2025, 2:38pm UTC](https://devforum.okta.com/t/sample-using-react-router-v7-spa/34286/2 "2025-09-04T14:38:14Z")

</div>

Hi there @dkpsthomas ,

Welcome to the community!

This sample is a React app using v7 of the `react-router-dom` library and has its own implementation of the `SecureRoute`component.

> **[GitHub - okta-samples/okta-react-sample: React + Okta](https://github.com/okta-samples/okta-react-sample)**
>
> React + Okta

Let us know how it goes for you!

---

<div class="post-metadata">

**Author:** ![dkpsthomas](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dkpsthomas](https://devforum.okta.com/u/dkpsthomas)\
**Post date:** [September 4, 2025, 9:46pm UTC](https://devforum.okta.com/t/sample-using-react-router-v7-spa/34286/3 "2025-09-04T21:46:59Z")

</div>

I am using the new framework mode with app level routing. Do you have any sample for that?

---

<div class="post-metadata">

**Author:** ![alisaduncan](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/alisaduncan/32/3429_2.png) [@alisaduncan](https://devforum.okta.com/u/alisaduncan)\
**Post date:** [September 8, 2025, 6:55pm UTC](https://devforum.okta.com/t/sample-using-react-router-v7-spa/34286/4 "2025-09-08T18:55:33Z")

</div>

I’m pretty sure we don’t have an example with that. The sample I linked is the most recently updated one I’m aware of.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [October 8, 2025, 6:56pm UTC](https://devforum.okta.com/t/sample-using-react-router-v7-spa/34286/5 "2025-10-08T18:56:27Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
