mikker / passwordless

🗝 Authentication for your Rails app without the icky-ness of passwords
MIT License
1.25k stars 86 forks source link

Add `after_session_confirm` hook after session confirmation #213

Open onedanshow opened 3 months ago

onedanshow commented 3 months ago

Just a suggestion to add a after_session_confirm similar to after_session_save. This would let folks mark accounts as "verified" or "has_verified_email" after session confirmation.

mikker commented 3 months ago

Good idea!

onerinas commented 1 month ago

This would be a great feature. I'm marking the "email_verified" field if current_user is present. I have added this check in ApplicationController, which is not ideal as it checks on every single request.

I looked around the code to see if I can contribute in any way but not sure what would be the best way to add this. May be somewhere in authenticate_and_sign_in?