Figured this out. Google uses the access_type
parameter for offline access request instead of scope. So we can handle the OnRedirectToIdentityProvider
event in OpenIdConnectOptions
to add this parameter:
options.Events.OnRedirectToIdentityProvider = context =>
{
context.ProtocolMessage.SetParameter("access_type", "offline");
return Task.CompletedTask;
};
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…