Using the Okta Widget with a Separate Client

This is my current situation —

I have a client application A, and a Custom Login Example B.

Is it possible to have an end user

  1. click “login” on application A
  2. get redirected to the widget on application B
  3. then upon successful login get redirected back to A authenticated?

I’m currently trying this with a widget. Steps 1 and 2 are fine, but I keep getting “AuthSdkError: Unable to parse a token from the URL” when I redirect back to application A. On the dashboard, it looks like I get a successful login from Application B.

App A is hosted on localhost:3000 and App B is on localhost:8080.

it all depends on the type of your applications, but why don’t you want to have widget for each of the applications? what is the final goal of this architecture?

In the end, we want to dynamically pass in Application A’s Client ID and Issuer to Application B. That way any application that redirects Application B can authenticate against their own auth server. We don’t want to have to build a different widget for each of our applications.

What you are trying to build is SSO :slight_smile: so your application B acts as a gateway to Okta, in other words as SSO provider, hiding Okta being real SSO. I’d think twice going this route… Theoretically it’s possible, I guess, but you’d have to invent your own flow for that, with the security review for the solution etc…