Open rwxzig opened 2 months ago
Hi @rwxzig, thanks for checking out the project! As you can probably tell, this is very much a work in progress and I haven't been able to work on it over the last couple of months, but I am hoping to get back to it soon.
I need to add the RedisKit library to Nuget to make things much simpler, but in the meantime the package is hosted using GitHub (https://github.com/melittleman/RedisKit/pkgs/nuget/RedisKit) so if you'd like to use that instead of directly referencing it, you can create a GitHub PAT with the "read:packages" scope and then use the command: dotnet nuget add source https://nuget.pkg.github.com/melittleman/index.json --name melittleman --username YOUR_USERNAME --password YOUR_PAT --store-password-in-clear-text
to be able to download and install packages from that repo.
Hope that helps! Let me know if you have any questions.
Thank you for your reply, I was wondering if you could provide some information about the first startup, on how to setup the application for initial startup, what are the prerequisites etc.
Even after adding your account as package provider, I still get this error:
RedisKit.RedisConnection: Information: Configuring Redis endpoints: Unspecified/localhost:6379 RedisKit.RedisConnection: Information: Attempting connection to Redis endpoints: Unspecified/localhost:6379
Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider: Error: An error occurred while reading the key ring.
System.InvalidOperationException: Redis multiplexer is not connected. We have lost connection to the server... at RedisKit.RedisConnection.get_Multiplexer() at RedisKit.RedisConnection.get_Db() at RedisKit.DependencyInjection.Extensions.RedisConnectionBuilderExtensions.<>c__DisplayClass0_1.
b__1() at Microsoft.AspNetCore.DataProtection.StackExchangeRedis.RedisXmlRepository.GetAllElementsCore()+MoveNext() at System.Collections.Generic.List 1..ctor(IEnumerable
1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) at Microsoft.AspNetCore.DataProtection.StackExchangeRedis.RedisXmlRepository.GetAllElements() at Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager.GetAllKeys() at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.CreateCacheableKeyRingCore(DateTimeOffset now, IKey keyJustAdded) at Microsoft.AspNetCore.DataProtection.KeyManagement.KeyRingProvider.GetCurrentKeyRingCore(DateTime utcNow, Boolean forceRefresh) BlazorIdentityAdmin.Infrastructure.Hosted.RedisIndexCreationService: Information: RedisIndexCreationService is executing on startup. 'BlazorIdentityAdmin.Web.exe' (CoreCLR: clrhost): Loaded '..\BlazorIdentityAdmin\src\Web\bin\Debug\net8.0\NRedisStack.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The exception is thrown on line 76 at RedisIndexCreationService.cs:
if (await _connection.Db.FT().CreateIndexAsync("idx:users", createParams, schema) is false)
There are only a couple of dependencies required to get the project up and running (I will try to better document them in the main README this weekend).
The first is obviously Redis so I would recommend setting that up via Docker using the command: docker run -d -v redis:/data -p 6379:6379 --name redis redis/redis-stack-server:latest
at which point this exception will go away.
The seconds is SendGrid for emails, so would recommend setting up a free Developer account (https://sendgrid.com) and then under Settings > Sender authentication > Single Sender Verification add the email address that you would like to send emails from. Once that is setup, you'll need to add 2 User Secrets as below:
dotnet user-secrets set SendGrid:ApiKey <API_KEY>
where the API_KEY has been created under Settings > API Keys.dotnet user-secrets set SendGrid:EmailFromAddress <EMAIL_ADDRESS>
where the EMAIL_ADDRESS is the verified sender you just setup.I hope that this helps! Let me know how you get on.
Perfect, it looks very good to begin with. A couple of points if I may.
First is a question, and I understand that it is a design choice, but the second is more like a suggestion.
Great to hear you got it up and working, and thanks for the feedback!
IEmailSender
implementation if needed. I wanted this application to be very opinionated just to showcase how the underlying identity scaffolding works in .NET 8 with the new Static Server Rendering, without being overwhelming to get started if there are too many technology decisions to make.Hope that all makes sense!
I was trying to run this project but it could not find the RedisKit package, however I resolved that by cloning the project and referencing it in the projects. Could you provide some more details on how to setup the application, as I am getting error on unable to connect to https server.