markbates/goth — pull request #18 by tylerb (2014-12-29 19:12:55+00:00)
Title: Add proper state handling

BeginAuth now takes a state string that is sent to the provider and returned to the caller during the callback. This allows the caller to maintain state between the various oauth hops.

The `GetState` function variable is used by the caller to provide the state string in the same manner as `GetProviderName` is used to provide the provider name to goth internals.

This may be a breaking change for some users if they are calling `BeginAuth` manually, though I can't see any reason anyone would be doing that.

@markbates please review and merge if acceptable.