I was levaraging Okta from next-auth/providers/okta to integrate SSO with my react app. I have done config and passing client id, secret and issuer and adding as oktaprovider in the providers: it is working fine in the local it was able to route to the okta login page and authentication happened and routed to my homepage with session but when I deployed in my cloud OCP I was getting below error and it’s not redirecting to okta login page from my login page SSO link. Please help on this issue attached error below is for your reference.

next-auth error signin_oauth_error
outgoing request timed out after 3500ms
message:outgoing request timed out after 3500ms’
stack: ‘RPERROR’: outgoing request timed out after 3500ms’

What version is your next auth? This may not be related to okta at all if this works locally.

What does your configuration between production and local look like? Are you using Turbo to build this before deployment? Can you try without Turbo?

It’s a good idea to check for endpoint-related errors where you are not even hitting OKTA due to errors, redirects. You check your [OKTA logs] (View Organization activity with the System Log | Okta) to see if you are able to see any logs related to the errors. to gather more information here.

You can always log network requests to see if there are any TLS or firewall-related issues, as timeouts are usually whitelist errors or socket errors.

Finally, check your okta config if you missed anything: next-auth/packages/next-auth/src/providers/okta.ts at v4 · nextauthjs/next-auth · GitHub (Most likely this needs to match your tenant and next config, there may be a mismatch somewhere…)

Let us know if that helps.

1 Like

my current next-auth version is 4.24.5 which is the latest one. well I am trying to deploy in dev environment as of now. I was even passing the okta config in development.yml as well still no luck. Not sure about turbo we are using our own process to package the application and then to deploy in to OCP cloud. Yeah I was working with okta team and couple other proxy teams. Have to see how it goes but yeah it’s very strange why it’s giving that timedout error in OCP logs.

1 Like

any updates please? I was trying everything from my side but still no luck when I reached out to my okta team they are saying they are n’t even getting any hits from my deployed OCP url so from my OCP logs only I am seeing that signin_auth_error with 3500 ms. So is there any way to add more debug logs to see why and where exactly it’s getting timedout in OCP logs

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