-
Notifications
You must be signed in to change notification settings - Fork 1k
Trying to update but missing TokenCacheProviders\Sql\MsalSqlTokenCacheProvider.cs #220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@thethird1978 could you please elaborate? Consider including error message, or more details on what is not working. |
SQL TokenCacheProvider folder was deleted in #214 |
@thethird1978 @Mrcl1450, we removed the SQL token cache direct implementation as it's possible and recommended to use a distributed cache with a SQL implementation (out of the box in ASP.NET Core) // or use a distributed Token Cache by adding
services.AddMicrosoftIdentityPlatformAuthentication(Configuration)
.AddMsal(new string[] { scopesToRequest })
.AddDistributedTokenCaches();
// and then choose your implementation
// SQL Server token cache
services.AddDistributedSqlServerCache(options =>
{
options.ConnectionString = _config["DistCache_ConnectionString"];
options.SchemaName = "dbo";
options.TableName = "TestCache";
}); |
@Mrcl1450 What do you mean it's missing? If you, as an app developer, decide to add a SQL Server cache you have (in your app), to add the corresponding NuGet package: https://www.nuget.org/packages/Microsoft.Extensions.Caching.SqlServer/ What Microsoft identity web does is provide an adapter to decouple the serialization itself |
If you meant sample 2-1-Call-MSGraph then yes, the sample doesn't come with |
This issue is for a: (mark with an
x
)The issue was found for the following scenario:
Please add an 'x' for the scenario(s) where you found an issue
Repro-ing the issue
Repro steps
Expected behavior
To be able to use SQL Token Cache:
services.AddDistributedSqlServerCache(options =>
{
options.ConnectionString = Configuration.GetConnectionString("TokenCacheDbConnStr");
options.SchemaName = "dbo";
options.TableName = "TokenCache";
});
Actual behavior
Possible Solution
Additional context/ Error codes / Screenshots
Any log messages given by the failure
Add any other context about the problem here, such as logs.
OS and Version?
Versions
Attempting to troubleshooting yourself:
Mention any other details that might be useful
The text was updated successfully, but these errors were encountered: