I have a Flask web application that is currently deployed on AWS Elastic Beanstalk with a configured Classic Load Balancer.
My issue is that my sessions do not seem to be persistent, as I had originally implemented session based auth, but when the frontend was deployed and hitting my API, sessions would not persist and users could never stay logged in.
I had intended to switch to token based auth, so that is what I did, and I avoided the session issue.
Fast forward, and I have now implemented OAuth1 using Flask-OAuthlib but unfortunately, this lib uses sessions to maintain the OAuth1 provider token secret.
I attempted to enable Duration-Based Session Stickiness via the AWS console for my Classic Load Balancer, but that seemingly did not resolve the issue.
The specific line of code that is causing me trouble is here.
Might there be a way to make this OAuth1 code stateless and not require the session?
Might I be configuring something wrong for my sessions, or missing a simple fix?
Any help would be very much appreciated.