backend-0.1.0.0
Safe HaskellNone
LanguageHaskell2010

Server.Auth.PasswordResetUtil

Synopsis

Documentation

generateResetToken :: IO Text Source #

Generate a cryptographically secure random token

hashToken :: Text -> Text Source #

Hash a token for secure storage

validateTokenFormat :: Text -> Bool Source #

Validate token format (base64 encoded, appropriate length)

createResetUrl :: Text -> Text -> Text Source #

Create a password reset URL with the given token

sendPasswordResetEmail :: Text -> Text -> Text -> IO () Source #

Send password reset email to user

getTokenExpirationTime :: IO UTCTime Source #

Calculate token expiration time (1 hour from now)