fedora-infra / flask-oidc

OpenID Connect support for Flask
24 stars 14 forks source link

Feature Proposal: Email verification #72

Open winston-yallow opened 8 months ago

winston-yallow commented 8 months ago

It seems like there is no way to enforce email verification since OIDC_REQUIRE_VERIFIED_EMAIL was deprecated.

I propose to add a decorator require_verified_email() that only grants access if the mail is verified.

winston-yallow commented 8 months ago

To be clear, it is possible to manually check session['oidc_auth_profile']['email_verified'], but the proposal would integrate this better into a typical flask workflow.

abompard commented 3 months ago

Yeah, it sounds reasonable, could you write the PR? I'll review it.