Add OIDC support & Flask 2.3+ fix #35

Merged
burritosoftware merged 3 commits from master into master 2024-06-25 07:19:15 +02:00
burritosoftware commented 2024-06-25 06:12:58 +02:00 (Migrated from github.com)

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.

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.
noahpistilli (Migrated from github.com) reviewed 2024-06-25 06:12:58 +02:00
oscie57 (Migrated from github.com) approved these changes 2024-06-25 06:19:04 +02:00
oscie57 (Migrated from github.com) left a comment

Looks good, though please refer to the unauthorised handler

Looks good, though please refer to the unauthorised handler
@ -24,19 +24,18 @@ app = Flask(__name__)
app.config["SQLALCHEMY_DATABASE_URI"] = config.db_url
oscie57 (Migrated from github.com) commented 2024-06-25 06:15:27 +02:00

This isn't how room-server handles it. Please make it consistent between the two.

This isn't how room-server handles it. Please make it consistent between the two.
oscie57 (Migrated from github.com) commented 2024-06-25 06:18:27 +02:00

Resolved in latest commit

Resolved in latest commit
@ -10,1 +10,3 @@
return redirect(url_for("root"))
@app.context_processor
def inject_oidc():
return dict(oidc=oidc)
oscie57 (Migrated from github.com) commented 2024-06-25 06:17:16 +02:00

Why was the unauthorised handler removed? How does the application react when an unauthorised user tries to make a request?

Why was the unauthorised handler removed? How does the application react when an unauthorised user tries to make a request?
burritosoftware (Migrated from github.com) reviewed 2024-06-25 06:20:32 +02:00
@ -10,1 +10,3 @@
return redirect(url_for("root"))
@app.context_processor
def inject_oidc():
return dict(oidc=oidc)
burritosoftware (Migrated from github.com) commented 2024-06-25 06:20:32 +02:00

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.

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.
oscie57 (Migrated from github.com) reviewed 2024-06-25 06:20:51 +02:00
@ -10,1 +10,3 @@
return redirect(url_for("root"))
@app.context_processor
def inject_oidc():
return dict(oidc=oidc)
oscie57 (Migrated from github.com) commented 2024-06-25 06:20:51 +02:00

Understandable, resolved

Understandable, resolved
burritosoftware commented 2024-06-25 06:24:09 +02:00 (Migrated from github.com)

Running black to resolve, then will squash and merge

Running black to resolve, then will squash and merge
burritosoftware commented 2024-06-25 06:28:58 +02:00 (Migrated from github.com)

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

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
Sign in to join this conversation.
No description provided.