Hi!
I'm learning about OKTA authentication using Flask, so, reading official documentation I find this demo.
After I've been configuring OKTA app in the platform I tried to log-in, but, I've been having an error cause by session object, which clears the 'app_state' and 'code_verifier' properties after '/login' on '/authorization-code/callback'. I've been debugging many times and my conclusion is that.
Following the session manager, when goes through login to callback and tries to recover the properties before mencioned, the session doesn't find these props.
So, when the app tries to the higlighted lines it fails:

Hi!
I'm learning about OKTA authentication using Flask, so, reading official documentation I find this demo.
After I've been configuring OKTA app in the platform I tried to log-in, but, I've been having an error cause by session object, which clears the 'app_state' and 'code_verifier' properties after '/login' on '/authorization-code/callback'. I've been debugging many times and my conclusion is that.
Following the session manager, when goes through login to callback and tries to recover the properties before mencioned, the session doesn't find these props.
So, when the app tries to the higlighted lines it fails: