aboutsummaryrefslogtreecommitdiff
path: root/src/actions/mixins/auth/password_resets/token_from_session.cr
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions/mixins/auth/password_resets/token_from_session.cr')
-rw-r--r--src/actions/mixins/auth/password_resets/token_from_session.cr5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/actions/mixins/auth/password_resets/token_from_session.cr b/src/actions/mixins/auth/password_resets/token_from_session.cr
new file mode 100644
index 0000000..820b91b
--- /dev/null
+++ b/src/actions/mixins/auth/password_resets/token_from_session.cr
@@ -0,0 +1,5 @@
+module Auth::PasswordResets::TokenFromSession
+ private def token : String
+ session.get?(:password_reset_token) || raise "Password reset token not found in session"
+ end
+end