# Want my app to NOT redirect to Okta Login Page

**URL:** <https://devforum.okta.com/t/want-my-app-to-not-redirect-to-okta-login-page/9619>\
**Category:** Questions\
**Created:** [June 3, 2020, 2:58pm UTC](https://devforum.okta.com/t/want-my-app-to-not-redirect-to-okta-login-page/9619 "2020-06-03T14:58:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![justin-dsg](https://avatars.discourse-cdn.com/v4/letter/j/bbce88/32.png) [@justin-dsg](https://devforum.okta.com/u/justin-dsg)\
**Post date:** [June 3, 2020, 2:58pm UTC](https://devforum.okta.com/t/want-my-app-to-not-redirect-to-okta-login-page/9619/1 "2020-06-03T14:58:50Z")

</div>

Hi, I have a React App using Express/Node backend. I’m using Okta to handle authentication/log-in, but I want to ONLY use my own React-designed login form. For React, I’m using the okta-react package to handle the Login, and on the Express backend I am using Okta-Jwt-Verifier to verify the web tokens.

I have things working mostly just how I want, except that when I log-in from my app, I get redirected to the Okta sign-in page and have to log-in again. Once I log in here a second time, I am redirected to the /implicit/callback of my site, and it renders the page correctly and loads the data.

I also notice that this redirect/forced second log-in doesn’t happen all the time. Only once in a while, or when I open an incognito window. So after logging in on the Okta page, this part “remembers” me, so I can log-out and log back in from within my App without being redirected to the Okta login page.

However, I would like my users to NEVER be redirected to the Okta sign-in page, and only have to have them log in from my React app.

Can anyone please tell me why this is happening to me, and how I can fix it? Thanks very much. Below is the React code that is executed when I click the submit button on my app’s login form.

handleSubmit(e) {  
e.preventDefault();  
this.oktaAuth.signIn({  
username: this.state.username,  
password: this.state.password,  
baseUrl: config.okta.url,  
clientId: config.okta.client\_id,  
redirectUri: config.okta.redirect\_uri  
})  
.then(res =\> {  
this.setState({sessionToken: res.sessionToken});  
this.props.onAuth();  
})  
.catch(err =\> {  
this.setState({ error: err.message });  
console.log(err.statusCode + ’ error’, err);  
});  
}

---

<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:** [January 24, 2024, 11:27pm UTC](https://devforum.okta.com/t/want-my-app-to-not-redirect-to-okta-login-page/9619/2 "2024-01-24T23:27:31Z")

</div>

Closed on January 24, 2024, 11:27pm UTC


