Hi my app is a react.js/Express app. And I have a custom login page that I use to log the user in.
At some point the app started redirecting to the Okta login page instead of using my login page. Does anybody know what could be causing the redirects? I have tried setting the "Initiate login URI " and some other fields with out any effect so far. Would appreciate any help.
Here is what my settings for Login look like:
Here is some of the log in code (okta-auth-js):
try {
const transaction = await this.oktaAuth.signIn({username, password})
if (transaction.status === 'SUCCESS') {
// Perform a call to mongo DB
this.props.loginAction(transaction)
// Do I need to call "this.oktaAuth.session.setCookieAndRedirect(transaction.sessionToken);" like the example in (okta-auth-js)? The tutorial I followed didn't do this. (https://scotch.io/tutorials/add-user-registration-to-your-site-with-node-react-and-okta)
} else {
// error logging here
}
} catch (err) {
// set error in redux error reducer
this.props.setErrorAction({
code: err.statusCode || 'Generic authentication error',
message: err.message || 'Generic authentication error'
})
// Can't get proper error messages from the response, "Authentication error" returns for everything .. :(
}
}