Okta Flask Integration

I want to protect my Flask REST endpoints using Okta and OpenID connect.

I have seen how to do it for routes that are views of the application, but is there a way to integrate Okta with REST endpoints? When I make calls to my API, I get the html for Okta as a response, even if I'm logged in in the browser.

Python 24-10-20, 3:11 p.m. junnusipra

Log-in to answer to this question.