# Proper Okta authentication login flow with React-Admin

**URL:** <https://devforum.okta.com/t/proper-okta-authentication-login-flow-with-react-admin/19670>\
**Category:** Questions\
**Created:** [March 4, 2022, 7:19am UTC](https://devforum.okta.com/t/proper-okta-authentication-login-flow-with-react-admin/19670 "2022-03-04T07:19:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chris.nguyen](https://avatars.discourse-cdn.com/v4/letter/c/e495f1/32.png) [@chris.nguyen](https://devforum.okta.com/u/chris.nguyen)\
**Post date:** [March 4, 2022, 7:19am UTC](https://devforum.okta.com/t/proper-okta-authentication-login-flow-with-react-admin/19670/1 "2022-03-04T07:19:21Z")

</div>

Hi all,

We want to use Okta as the way to authenticate users and we’re building the app using React-Admin which use _react-router@6_ so we can’t use _@okta/okta-react_ package since it still use v5 at the moment.

A bit more context of our app:

- There will be a logic controlled by React Admin, which redirects to Login page if user is not authenticated, e.g. token not present in localStorage (we can customize this logic, customize UI for Login page)

So basically, all we want is at Login page somehow trigger Okta login flow, then maintain the session through out the app. Can you point me the the proper way to authenticate?

Thanks

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 12, 2024, 6:14pm UTC](https://devforum.okta.com/t/proper-okta-authentication-login-flow-with-react-admin/19670/2 "2024-02-12T18:14:55Z")

</div>


