Azure-Samples / ms-identity-python-webapp

A Python web application calling Microsoft graph that is secured using the Microsoft identity platform
MIT License
298 stars 143 forks source link

Flask version should be 2.2.4 or less #102

Closed konabuta closed 1 year ago

konabuta commented 1 year ago

session_cookie_name is deprecated in Flask version 3.x

rayluo commented 1 year ago

in Flask version 3.x

Did you mean to say "2.3+"?

Also, this repo does not use that session_cookie_name. What was the issue? (Guess I can also try that out to find out...)

Regardless, pinning an upper bound is just a bandage. Ideally, we shall find a way to make it work with latest version of Flask, if it hasn't already.

ehuff700 commented 1 year ago

Had this same issue, didn't look into it too much but downgrading to Flask 2.2.4 worked for me.

konabuta commented 1 year ago

@rayluo Oh, sorry. I mean Flask version 2.3+. flask_session library depends on session_cookie_name which is deprecated in Flask 2.3+. See https://github.com/fengsp/flask-session/issues/150.

I think we should find alternative to flask_session library to use the lastest version of Flask.

rayluo commented 1 year ago

Thanks for sharing the context, @konabuta . This should ideally be fixed in upstream. I have just pinged the author there. Let's give it a day or two, before we consider plan B.

rayluo commented 1 year ago

You may try again by using the same web app, but re-run pip install -U -r requirements.txt. It should work this time. Please add a thumb-up reaction if your test also passes.