Add OIDC support & Flask 2.3+ fix #35
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
krnl/food-server!35
Loading…
Reference in a new issue
No description provided.
Delete branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds OpenID Connect support and fixes an issue with the server not running on Flask 2.3+ due to the deprecation of
@app.before_first_request, see https://stackoverflow.com/questions/73570041/flask-deprecated-before-first-request-how-to-update.Needs Black formatter to be run.
Looks good, though please refer to the unauthorised handler
@ -24,19 +24,18 @@ app = Flask(__name__)app.config["SQLALCHEMY_DATABASE_URI"] = config.db_urlThis isn't how room-server handles it. Please make it consistent between the two.
Resolved in latest commit
@ -10,1 +10,3 @@return redirect(url_for("root"))@app.context_processordef inject_oidc():return dict(oidc=oidc)Why was the unauthorised handler removed? How does the application react when an unauthorised user tries to make a request?
@ -10,1 +10,3 @@return redirect(url_for("root"))@app.context_processordef inject_oidc():return dict(oidc=oidc)When an unauthorized user tries to make a request it will go to login, if the route has an @oidc.require_login decorator. This is same as room-server which doesn't have this unauthorized handler. The unauthorized handler is also related to flask-login which was removed anyway.
@ -10,1 +10,3 @@return redirect(url_for("root"))@app.context_processordef inject_oidc():return dict(oidc=oidc)Understandable, resolved
Running black to resolve, then will squash and merge
Need check bypass from @noahpistilli, if you could check the black formatted files commit, and then turn off Required statuses/checks in the repo settings, thanks