yesodweb/yesod — Issue #233: Can't specify AuthPlugin's throught an external configuration file
Author: meteficha
Created: 2012-01-20 19:34:17+00:00
State: open

Hello!

I'd like to be able to specify some `AuthPlugin`'s parameters throught an external configuration file (instead of hard-coding on the source files). For example, `authFacebook` requires the app's id and secret and I'd like to avoid hard-coding these fields. However, `authPlugins` is a pure list of `AuthPlugins` and so it can't access my application's foundation data type.

I see two ways of solving the problem:

1. Allow `authPlugins` to take a look at the foundation data type, changing it to be inside `GHandler`.

2. On `Yesod.Auth.Facebook`, instead of taking those values as parameters to `authFacebook`, create a type class such as

```haskell
class YesodAuthFacebook master where
facebookCredentials :: master -> ...
```

Thoughts?

Cheers! =)