Node.js multiple issuer redirect login

Hello, we have a nodejs express web application that’s using OIDC authentication. We have two separate Okta issuers for employees and partners to be able to log in to the app, but I am unable to find the correct way to set up multiple issuer login redirects. Our issue is similar to this Multiple Client Id and Multiple Issuer URL. · Issue #243 · okta/samples-js-react · GitHub but we are not using React. We are using the @okta/okta-auth-js package.

I have an interim page set up that creates two OktaAuth client objects and redirects to the correct login page for each issuer, but I’m not sure how to handle the redirect values that are returned in the query. Since this is not an SPA I am handling the redirect in a route on the nodejs server.

Any advice or help would be greatly appreciated.

Hi, having two OktaAuth Clients will cause race condition errors between both these clients. So it is not a recommended approach.

1 Like