packages feed

yesod-auth-oauth2 0.7.1.2 → 0.7.1.3

raw patch · 3 files changed

+12/−4 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,4 +1,9 @@-## [_Unreleased_](https://github.com/thoughtbot/yesod-auth-oauth2/compare/v0.7.1.2...main)+## [_Unreleased_](https://github.com/thoughtbot/yesod-auth-oauth2/compare/v0.7.1.3...main)++## [v0.7.1.3](https://github.com/thoughtbot/yesod-auth-oauth2/compare/v0.7.1.2...v0.7.1.3)++- Add support (with caveats) for relative approots+  [@cptrodolfox](https://github.com/freckle/yesod-auth-oauth2/pull/178)  ## [v0.7.1.2](https://github.com/thoughtbot/yesod-auth-oauth2/compare/v0.7.1.1...v0.7.1.2) 
src/Yesod/Auth/OAuth2/Dispatch.hs view
@@ -105,14 +105,17 @@   -> Text   -> m OAuth2 withCallbackAndState name oauth2 csrf = do-  uri <- ($ PluginR name ["callback"]) <$> getParentUrlRender-  callback <- maybe (throwError $ InvalidCallbackUri uri) pure $ fromText uri+  callback <- maybe defaultCallback pure $ oauth2RedirectUri oauth2   pure     oauth2       { oauth2RedirectUri = Just callback       , oauth2AuthorizeEndpoint =           oauth2AuthorizeEndpoint oauth2 `withQuery` [("state", encodeUtf8 csrf)]       }+ where+  defaultCallback = do+    uri <- ($ PluginR name ["callback"]) <$> getParentUrlRender+    maybe (throwError $ InvalidCallbackUri uri) pure $ fromText uri  getParentUrlRender :: MonadHandler m => m (Route (SubHandlerSite m) -> Text) getParentUrlRender = (.) <$> getUrlRender <*> getRouteToParent
yesod-auth-oauth2.cabal view
@@ -1,6 +1,6 @@ cabal-version:   1.18 name:            yesod-auth-oauth2-version:         0.7.1.2+version:         0.7.1.3 license:         MIT license-file:    LICENSE maintainer:      engineering@freckle.com