How to validate api call with okta service in flask api which is acting as backend

Hi,
I am building an app with mvc model. Vue is my frontend framework and flask is backend framwork for API which is connected to DB.
I can authenticate user on frontend through okta and provide access to application frontend. Now I am trying to implement okta on backend flask api to validate the API call and authorize CRUD operations.
I am using Tutorial from okta but it is using web application on okta, I am using single page app and i dont have “client_secret” and also i dont understand what is

app.config["SECRET_KEY"] = "{{ LONG_RANDOM_STRING }}"

Can you please help me on how to validate api calls on backend flask be process request ?

I am ready to share my work either frontend vue code or backend flask code.
Thanks,

Hello,
It sounds like your Flask app is acting as a resource server. I believe the tutorial you are following it is acting as we web app that you login to. Since you have the Angular FE portion working I would suggest looking at one of our Python samples using Flask as a resource server.

After following the steps and using the code for oidc, i get error
{“error”: “invalid_token”, “error_description”: “Token required but invalid”}

And dont know what is “client_secret”, I am using single page app.

That tutorial won’t work with a Single Page App. Try creating a Web app in Okta, that should provide you with a client id and a client secret.

Is there any chance to get single page server side authentication document or support ?

Hi there, I am currently trying to configure the same thing and have been struggling. I have a React SPA that is authenticated with the Okta sign in widget. I would like to secure my flask api endpoints to be authorized only upon login, with okta, but struggling to find documentation when my React app is set up SPA and not a web app. I am using flask as a resource api