Hello,
First of all, thank you for this amazing work !
I'm trying to make pixel-identity running through Visual Studio. I want to customize the code by adding Azure Configuration and Azure Vault, so I can't use the out-of-the-box docker. (Furthermore I won't use Docker so the code is perfect for me).
Reading the documentation, I've configured the appsettings.json
as following :
{
"InitAdminUser": "[email protected]",
"InitAdminUserPass": "Admi9@pixel",
"IdentityHost": "http://localhost:44382/pauth",
"AllowedOrigins": "http://localhost:44382",
"ConnectionStrings": {
"PostgreServerConnection": "[LOCALHOST POSTGRESQL CONNECTION STRING HERE]"
},
"Plugins": {
"Collection": [
{
"Type": "DbStore",
"Path": "Plugins\\DbStore",
"Name": "Pixel.Identity.Store.PostgreSQL"
},
{
"Type": "EmailSender",
"Path": "Plugins\\Messenger",
"Name": "Pixel.Identity.Messenger.Console"
}
]
}
}
I've made the changes by managing the secrets for the user, by modifying the secrets.json
file.
When running the code, I got an issue about Docker Desktop which wasn't install on my machine. Because I don't plan to use Docker, I removed anything talking about Docker in the code.
Then I got another issue telling me that the Pixel.Identity.Store.Sql.Shared
project was not found so I added a direct dependency to the main project.
From here, the code compiles, and the UI starts. The localhost database is also fulfilled with the admin account. Great !
But unfortunately, without doing anything else, I have this error in the UI :
There was an error trying to log you in: 'Bad Request (400)'
And looking at the output window on Visual Studio, here are the logs I got :
Initializing host services...
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2]
Authorization failed. These requirements were not met:
DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2]
Authorization failed. These requirements were not met:
DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
ClaimsAuthorizationRequirement:Claim.Type=identity_read_write and Claim.Value is one of the following values: (scopes)
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2]
Authorization failed. These requirements were not met:
DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
ClaimsAuthorizationRequirement:Claim.Type=identity_read_write and Claim.Value is one of the following values: (applications)
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2]
Authorization failed. These requirements were not met:
DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
ClaimsAuthorizationRequirement:Claim.Type=identity_read_write and Claim.Value is one of the following values: (roles)
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2]
Authorization failed. These requirements were not met:
DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
ClaimsAuthorizationRequirement:Claim.Type=identity_read_write and Claim.Value is one of the following values: (users)
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2]
Authorization failed. These requirements were not met:
DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2]
Authorization failed. These requirements were not met:
DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
When I try to hit the "LOGIN" button, the UI seems to refresh, and I get the same error from the UI. But in the output window, nothing is logged.
If I click Home, the UI keeps saying me that I made a bad request, and the output logs are just
info: Microsoft.AspNetCore.Authorization.DefaultAuthorizationService[2]
Authorization failed. These requirements were not met:
DenyAnonymousAuthorizationRequirement: Requires an authenticated user.
Finally, I can create a user bit hitting the REGISTER button. In the database, the user is successfully created. But on the UI, after the registration, nothing happens. I'm still having the Bad Request error, and I still can't use the LOGIN button.
To make the investigation easier, I've forked the project here : https://github.com/maximeozenne/pixel-identity
But I didn't change much things so...
Do you know what is happening please ?
Thanks again, and have a nice day !