Skip to content

v1.1.0

Latest

Choose a tag to compare

@niemyjski niemyjski released this 13 Nov 23:22
· 0 commits to ef2b147212253747471d361b615d482c33ab9503 since this release

Recommended upgrade path

<PackageReference Include="OAuth2" Version="1.1.0" />

Highlights

  • Added a net11.0 target and updated RestSharp to 114.1.0.
  • Added nullable UserInfo.EmailVerified and provider-specific UserInfo.ProviderData, including Google's hd claim.
  • 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.ProviderName is now DigitalOcean, and current responses use info.uuid as UserInfo.Id when the legacy uid is 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, with sub mapped to UserInfo.Id. Applications that linked users with another key need a trusted migration. Profile fields require the profile scope and an approved application.
  • Yahoo: UserInfo requests use /openid/v1/userinfo. Configure openid profile email for names and email. The UserInfo sub is used for UserInfo.Id and UserProfileGUID; 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 legacy id parser fallback. Scoped applications need users:read for 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