freckle/yesod-auth-oauth2

relax yesod-auth bound to allow version 1.3

maxcan opened this issue · 5 comments

relax yesod-auth bound to allow version 1.3

I'm not sure it's so simple. That upper bound may be legit without accompanying source changes:

Yesod/Auth/OAuth2.hs:50:50:
    Couldn't match type ‘()’ with ‘TypedContent’
    Expected type: Yesod.Auth.Method
                   -> [Yesod.Auth.Piece] -> HandlerT Auth (HandlerT m IO) TypedContent
      Actual type: Yesod.Auth.Method
                   -> [Yesod.Auth.Piece] -> HandlerT Auth (HandlerT m IO) ()
    In the second argument of ‘AuthPlugin’, namely ‘dispatch’
    In the expression: AuthPlugin name dispatch login
Failed, modules loaded: none.

We are using this patch on yesod-auth-1.3.1.1
What version of yesod-auth are you building with?

This looks like a 1.2 - 1.3 difference, although I am a little confused by it.

Another dependency issue is that hoauth2 has released new versions which allow new versions of http-conduit.

We are using this patch on yesod-auth-1.3.1.1

What's "this patch" mean?

What version of yesod-auth are you building with?

After relaxing the upper bound to < 1.4, this error occurs when building against yesod-auth 1.3.4. I assumed the type for AuthPlugin changed from 1.2 to 1.3, so we'll need to adjust and add a lower bound. I just haven't had a chance to confirm / make that change yet.

I looks like newer hoauth2 (or http-conduit) also has breaking changes as I get other type errors when allowing that. I'm going to table those for now and focus on yesod-auth 1.3 compatibility in this issue.

fix is on #7

Closing as #7 has been merged.