OAuth1 Module for Authboss
| Info and Requirements | |
|---|---|
| Module | oauth1 |
| Pages | None |
| Routes | /oauth1/{provider}, /oauth1/callback/{provider} |
| Emails | None |
| Middlewares | LoadClientStateMiddleware |
| ClientStorage | Session |
| ServerStorer | OAuth1ServerStorer |
| User | OAuth1User |
| Values | None |
| Mailer | None |
This is a tougher implementation than most modules because there's a lot going on. In addition to the
requirements stated above, you must also configure the oauth1.Providers. It's a public variable in the module.
import oauth1 "github.com/stephenafamo/authboss-oauth1"
oauth1.Providers = map[string]oauth1.Provider{}The providers require an oauth1 configuration that's typical for the Go oauth1 package, but in addition
to that they need a FindUserDetails method which has to take the token that's retrieved from the oauth1
provider, and call an endpoint that retrieves details about the user (at LEAST user's uid).
These parameters are returned in map[string]string form and passed into the oauth1.ServerStorer.
Please see the following documentation for more details: