oktaAuth.isLoginRedirect() returns False After Redirect Back

To resolve the issue detailed in Redirect Issue: Successfully Logging in with Okta but Redirected to Okta Dev Dashboard Instead of redirectUri, I made changes to the link of the ‘Sign with Google’ button in the Customized Help Links section, to be https://{oktaDomain}/sso/idps/{googleIdpId}?fromURI="+encodeURI(redirectUrl);. This allowed me to successfully redirect back to my specified redirectUri after logging in with a Google account.

However, I observed that oktaAuth.isLoginRedirect() returns false after the redirect back, and it becomes true only when I call oktaAuth.signInWithRedirect() again.
How can I address this? Is there a way to set oktaAuth.isLoginRedirect() to true immediately upon redirecting back to the redirectUri?

You need to kick off the /authorize request once Okta redirects back to your application. When logging in through an external Idp in Okta Classic, the flow will only get you into the Okta dashboard. Passing a fromURI to the /sso/idps endpoint will only ensure that users are sent back to your application, not that the /authorize request would be made.

So yes, you will need to call signInWithRedirect to complete the login flow for these federated users so that your application can receive tokens.