Repository navigation
Recommended upgrade path
<PackageReference Include="OAuth2" Version="1.1.0" />Highlights
- Added a
net11.0target and updated RestSharp to 114.1.0. - Added nullable
UserInfo.EmailVerifiedand provider-specificUserInfo.ProviderData, including Google'shdclaim. - Updated provider requests and response handling, including DigitalOcean, ExactOnline, Uber, and Yahoo.
- Shared the default HTTP transport across clients and blocked cross-origin redirects to protect OAuth credentials.
- Expanded provider, request, serialization, and transport regression coverage.
Breaking changes and migration
.NET 8 target removed
The dedicated net8.0 asset has been removed because .NET 8 has reached end of support. The package now targets netstandard2.0, net10.0, and net11.0. Compatible .NET 8 applications can resolve the netstandard2.0 asset, but should upgrade to a supported runtime and verify dependency compatibility. That asset now has an explicit System.Text.Json 11.0.0 dependency.
Provider identity and endpoint changes
- DigitalOcean:
UserInfo.ProviderNameis nowDigitalOcean, and current responses useinfo.uuidasUserInfo.Idwhen the legacyuidis absent. Applications storing a numeric ID or null provider name need a trusted account-link check; do not link by email alone. - Uber: UserInfo requests use
/v3/me, withsubmapped toUserInfo.Id. Applications that linked users with another key need a trusted migration. Profile fields require theprofilescope and an approved application. - Yahoo: UserInfo requests use
/openid/v1/userinfo. Configureopenid profile emailfor names and email. The UserInfosubis used forUserInfo.IdandUserProfileGUID; a supplied legacy token GUID must match it. - ExactOnline: The authorization endpoint is now
/api/oauth2/auth, and current OData profile responses are mapped. Review redirect and integration configuration. - Asana: UserInfo requests now request
gid, retaining the legacyidparser fallback. Scoped applications needusers:readfor the user endpoint.
Review stored account identifiers and test the complete sign-in and account-link flow for each affected provider before upgrading. See the provider compatibility guidance.
Redirects, Salesforce URLs, and custom integrations
The default request factory rejects redirects to another scheme, host, or port. Integrations that rely on cross-origin redirects must use the provider's documented endpoint directly or supply an application-owned IRequestFactory with an explicit redirect policy. Salesforce identity URLs must be absolute HTTPS URLs. RestSharp is now 114.1.0; test integrations that use its types or custom request factories directly.
UserInfo serialization
Default System.Text.Json serialization now includes EmailVerified and ProviderData, including null values. Consumers that require an exact JSON schema should review their serialization settings and contracts. Older JSON still deserializes with the new properties set to null.
Email verification and provider claims
EmailVerified preserves a provider's true or false assertion; null means unknown or not mapped. Google, LinkedIn, Salesforce, Uber, Yahoo, and GitHub populate it where their responses supply the relevant claim. GitHub public profile email alone does not establish verification. Google exposes its hosted-domain claim as ProviderData["hd"] and continues to map sub to UserInfo.Id.
Use EmailVerified is true to check an affirmative assertion, and apply the provider's email-authority rules before account linking. Look up linked accounts by ProviderName and UserInfo.Id; email addresses can change or be reassigned. See the email verification guidance.
Reliability and security
- Fixed GitHub token refresh and provider request authentication and signing issues, including Mail.ru and Odnoklassniki.
- Isolated client settings while reusing HTTP connections; on supported desktop/server platforms, connections periodically expire to pick up DNS changes.
- Documented caller responsibility for validating OAuth callback state and using a separate client instance for each authentication flow.
- Added tests for provider response shapes, credentials isolation, redirects, timeouts, and serialization. Provider tests use synthetic responses and do not establish live login compatibility.
Full changelog
Compare: v1.0.0...v1.1.0