OAuth: Upgrade Dvara version, fxing some bugs

This commit is contained in:
Pere Lev 2024-07-05 20:01:23 +03:00
parent cd1bc1aee3
commit 37f1665f16
No known key found for this signature in database
GPG key ID: 5252C5C863E5E57D
2 changed files with 3 additions and 1 deletions

View file

@ -73,6 +73,7 @@ import Yesod.Auth.Unverified.Creds
import Yesod.Mail.Send import Yesod.Mail.Send
import qualified Network.HTTP.Signature as S (Algorithm (..)) import qualified Network.HTTP.Signature as S (Algorithm (..))
import qualified Yesod.Hashids as YH
import Control.Concurrent.Actor hiding (Message) import Control.Concurrent.Actor hiding (Message)
import Crypto.ActorKey import Crypto.ActorKey
@ -774,6 +775,7 @@ instance YesodAuthDvara App where
maybe (Left err) (Right . toSqlKey) $ readMaybe $ T.unpack t maybe (Left err) (Right . toSqlKey) $ readMaybe $ T.unpack t
where where
err = "Failed to parse an Int64 for AuthId a.k.a PersonId" err = "Failed to parse an Int64 for AuthId a.k.a PersonId"
getUserRoute = fmap PersonR . YH.encodeKeyHashid
instance DvaraScope (YesodAuthDvaraScope App) where instance DvaraScope (YesodAuthDvaraScope App) where
renderScope ScopeRead = "read" renderScope ScopeRead = "read"

View file

@ -18,7 +18,7 @@ extra-deps:
- git: https://codeberg.org/ForgeFed/darcs-lights - git: https://codeberg.org/ForgeFed/darcs-lights
commit: d12cfc6f7ac7593910da0803ff7fb7ac82a3a460 commit: d12cfc6f7ac7593910da0803ff7fb7ac82a3a460
- git: https://codeberg.org/ForgeFed/dvara - git: https://codeberg.org/ForgeFed/dvara
commit: 7dc7cd8eaf235d27d5d9c7743024bde437381b1a commit: 01c01ecce624b366cb630ec93e2a80bb873ef7e2
- git: https://codeberg.org/ForgeFed/haskell-hit-graph - git: https://codeberg.org/ForgeFed/haskell-hit-graph
commit: f00d8c927ac37f4c4c28aee56069d2ca068b6536 commit: f00d8c927ac37f4c4c28aee56069d2ca068b6536
- git: https://codeberg.org/ForgeFed/haskell-hit-harder - git: https://codeberg.org/ForgeFed/haskell-hit-harder