-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Session cache key XXXX-b2c_1a_signup_signin.XXXX not found in session {guid} #16446
Comments
Thank you for submitting your first issue, awesome! 🚀 We're thrilled to receive your input. If you haven't completed the template yet, please take a moment to do so. This ensures that we fully understand your feature request or bug report. On what happens next, see the docs. If you like Orchard Core, please star our repo and join our community channels. |
Do you use Azure Data Protection or the default one? Are you sure no other process can remove the keyrings? If you're using the default store, they're under |
@Piedone I am using the default one. I am able to see all the tenant folders under No Other process is overriding the DataProtection in the application. I have a question
|
Hmm, strange. No, a new key ring should only be generated when either there was no key ring yet, or the existing one expired. While I won't be able to help from the top of my head, my hunch is that perhaps something is incompatible with OC's caching or key ring handling. My only suggestion is that you try to set up Azure B2C in a module, similar to the other Microsoft authentication features: https://github.com/OrchardCMS/OrchardCore/tree/main/src/OrchardCore.Modules/OrchardCore.Microsoft.Authentication. And if you do that, please also contribute it to OC :). However, perhaps this isn't needed? #3712 |
On Discord you wrote that you are using a web farm. If that is true you need to configure some distributed data protection provider, e.g. Redis or Azure. See https://docs.orchardcore.net/en/latest/reference/modules/DataProtection.Azure/ or https://docs.orchardcore.net/en/latest/reference/modules/Redis/ |
Well, that's a crucial information indeed. |
@gvkries @Piedone I have tried persisting data protection keys to Database, but for every tenant only one key is getting created. Here are the changes:
After running the application for multiple tenants I only see one row getting added to DB. I have even tried putting this code in individual module project but still I was getting only one row (no matter how many tenants I have opened ) For storing Data Protection keys to Azure I have placed this code in appsettings file
should I make any other changes in Program.cs for this to work ? Or OC automatically triggers based on this setting in appsettings.json file ? |
I don't think we'll be able to help you if you want to store these key rings outside of OC via EF. You only need one store; if you set up Azure Data Protection, then nothing else is needed. And yes, you only need to configure it like that. |
@Piedone Thanks for the clarification. I have used the same settings and updated in appsettings.json file in the WebHost project. I have tried these scenarios.
|
I suggest you try first by removing everything unnecessary from your You can also check the logs, even after increasing the log level to |
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues). This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here. |
It seems that this issue didn't really move for quite a while despite us asking the author for further feedback. Is this something you'd like to revisit any time soon or should we close? Please reply. |
Closing this issue because it didn't receive further feedback from the author for very long. If you think this is still relevant, feel free to reopen it with the requested details. |
Describe the bug
I am using Azure AD B2C for authentication and I am using Orchard Core for multi tenant in my mvc app(.Net 8).
In this application there are multiple tenants and multiple modules as well.
Orchard Core version
OrchardCore.Application.Mvc.Targets -> 1.8.2
OrchardCore.Application.Module.Targets -> 1.8.2
To Reproduce
Steps to reproduce the behavior:
b. Session cache key XXXX-b2c_1a_signup_signin.XXXX not found in session {guid}
Expected behavior
I would expect that as long as cookie is valid the api calls should return good input.
Logs and screenshots
The text was updated successfully, but these errors were encountered: