Working with Extra Data

We put the minimal amount of user data possible in credsExtra – just enough
to support you parsing or fetching additional data yourself.

For example, if you work with GitHub and GitHub user profiles, you likely
already have a model and a way to parse the /user response. Rather than
duplicate all that in our library, we try to make it easy for you to re-use that
code yourself:

Changes

InvalidProfileResponse was replaced with different, situation-specific
constructors; the exception type is considered internal API, but end-users may
see them in logs, or if they (unexpectedly) escape our error-handling

Errors during log-in no longer result in 4XX or 5XX responses; they now
redirect to LoginR with the exception details logged and something
user-appropriate displayed via setMessage

TL;DR: you’ll no longer find things like username or email as keys in
the credsExtra map. Instead, you’ll find the encoded profile response we
received and the OAuth access token. You can/should do your own decoding or
make your own follow-up requests to get extra data about your users.

This reduced a lot of complexity, likely duplication between our decoding and
yours, and (I think) makes the library easier to use.