I know Microsoft provides a Google-specific OIDC package (Microsoft.AspNetCore.Authentication.Google
) which takes an option in .AddGoogle()
to specify AccessType
that can be set to offline
.
But can this be done using the standard ASP.NET Core OIDC package Microsoft.AspNetCore.Authentication.OpenIdConnect
and .AddOpenIdConnect()
?
With Microsoft account we can simply request the offline_access
scope and it works perfectly. But it does not work with Google and results in an invalid_scope
error.