How to secure my api using okta?

Hi I am using flask and okta in order to create a secure api, is secure my code? first of all, I start the session from my web applkication and after that with the next code from my api I validate session:@inmueble.route("/", methods = [‘GET’])
@oidc.require_login
def get_inmuebles():
inmuebles= Inmueble.query.all()
result = inmuebles_schema.dump(inmuebles)

    return jsonify(result.data)