buildPlugin
    :: YesodAuth m
    => FetchToken
    -> WidgetFor m ()
    -> Text
    -> OAuth2
    -> FetchCreds m
    -> AuthPlugin m
buildPlugin getToken widget name oauth getCreds = AuthPlugin
    name
    (dispatchAuthRequest name oauth getToken getCreds)
    login
    where login tm = [whamlet|<a href=@{tm $ oauth2Url name}>^{widget}|]

-- | Read the @'AccessToken'@ from the values set via @'setExtra'@
buildPlugin
    :: YesodAuth m
    => FetchToken
    -> WidgetFor m ()
    -> Text
    -> OAuth2
    -> FetchCreds m
    -> AuthPlugin m
buildPlugin getToken widget name oauth getCreds = AuthPlugin
    name
    (dispatchAuthRequest name oauth getToken getCreds)
    login
    where login tm = [whamlet|<a href=@{tm $ oauth2Url name}>^{widget}|]

-- | Read the @'AccessToken'@ from the values set via @'setExtra'@
buildPlugin getToken widget name oauth getCreds = AuthPlugin
    name
    (dispatchAuthRequest name oauth getToken getCreds)
    login
    where login tm = [whamlet|<a href=@{tm $ oauth2Url name}>^{widget}|]

-- | Read the @'AccessToken'@ from the values set via @'setExtra'@