This forge component will allow you to easily implement the authorization code flow into your application.
If you are not familiar with the authorization code flow I recommend reading through some of the documentation from Okta
At a high-level, this flow has the following steps:
Details of component actions:
*** If you are using the self-hosted sign-in widget and you have the CSP security settings activated you will need to add rules through Service Center or Lifetime for your Okta domain and *.oktacdn.com to allow communication from the browser to your Okta domain and also to let the CSS from Okta through. You can try importing the CSS into your application but I found it to be too troublesome to manage inside of OutSystems.
I recommend setting up some site properties that can be used to pass your Okta application information easily to the actions: