Newbie question, Front End Web application talking to backend REST API, want to use SAML SSO

Hi,

I have a web application which is end user facing, and the web server will talk to another REST API server to perform actions.

The REST API server is implemented using Flask. It is currently doing username password for authentication.

Web application is also doing user authentication, it passed the username/password to the REST API server so both servers are doing the same authentication respectively.

If I want to integrate with OKTA SSO solution, what is the best practice here. Assuming when user first tries to access the web application(SP), it will now be redirected to Okta IDP, and after it get the SAML response back and verified, how can it proceed with the REST API server?

Your site must redirect user to IDP URL, which in its turn will call your REST API with the result. Your REST API handler must redirect to your application URL. Also use cookie to save login result.