Trying to follow this guide: https://learn.microsoft.com/en-us/aspnet/core/security/authentication/social/facebook-logins?view=aspnetcore-7.0
And trying to add the Facebook Login/Register to my .net app, but when following instructions I ran into that exception on the code:
services.AddAuthentication().AddFacebook(facebookOptions =>
{
facebookOptions.AppId = configuration["Authentication:Facebook:AppId"];
facebookOptions.AppSecret = configuration["Authentication:Facebook:AppSecret"];
});
The exception is: System.InvalidOperationException has been throw "The services collection cannot be modified because its read-only."
Any ideas?