Allow any user to manage two-factor authentication, show recipe error instead of throwing an exception, and a demo about Dynamic index tables are the topics for the week. You can still apply to speak at Harvest 2024 and share your insights on Orchard Core's future, CMS roles, AI tools, cloud integrations, and more! Let's see the details! Orchard Core updates Allow any user to manage two-factor authentication Two-factor authentication (2FA) is now available for all users. Previously, only users with permission to access the admin area could set up their 2FA methods, although all users could still use 2FA if it was set up by an admin. To enable this change, the method IsRequiredAsync() in both the ITwoFactorAuthenticationHandlerCoordinator and ITwoFactorAuthenticationHandler interfaces has been updated to IsRequiredAsync(IUser user). Summary of changes The feature OrchardCore.Users.EmailConfirmation was removed. This feature was recently added and was enabled by dependency only. Its services have been moved up to the OrchardCore.Users feature since it is a core functional and needed by OrchardCore.Users. Using the 2FA email method now requires email confirmation using the existing email confirmation process. As mentioned, the method IsRequiredAsync() in both the ITwoFactorAuthenticationHandlerCoordinator and ITwoFactorAuthenticationHandler was changed to IsRequiredAsync(IUser user). OK, so, what does it look like in action? First of all, you have to make sure that you have at least one two-factor authentication method enabled. To do that, you have to navigate to Configuration -> Features and enable the regarding features. We enabled two modules: Two-Factor Authenticator App Method: Provides users with a two-factor authentication method through any Authentication App. Two-Factor Email Method: Provides users with a two-factor authentication method through an Email service. Orchard Core provides a third two-factor authentication method through an SMS service but these two will be enough for demonstration. After that, we need to have a user without any special roles. We created a user under Security -> Users, where we used John as the user's name. Make sure that this user is enabled to be able to log in as John. The last thing we have to do is to make sure that the Default Theme is the current site theme because that theme renders the navbar by default and includes the dropdown with the Security-related settings. And as you can see in the screen below, we logged in as John. If you click Security on the dropdown menu that we mentioned earlier, you may notice that John can enable the two-factor authentication by adding one of the below two-factor methods. The SMS is not here, because we have only enabled the App Method and the Email Method features. Show recipe error instead of throwing an exception Currently, when importing a recipe and something goes throw, implementations of IRecipeStepHandler or IRecipeEventHandler will throw exceptions to report errors if something fails to import. In a production environment, the user gets a white page, which leaves them lost on what had happened. This is no longer the recommended approach for error reporting. Now, to handle errors, we have introduced a new property named Errors in the RecipeExecutionContext. This property allows you to log errors instead of throwing exceptions. These errors should be localized and must not contain any sensitive data, as they are visible to the end user. Exceptions are still used for logging additional information, but these are not shown to the end user. Additionally, if an error occurs, a new custom exception, RecipeExecutionException, is thrown. Let's say you want to import a deployment package or import JSON from text. Assume that the JSON contains some errors in both cases. Here, you can see that Orchard Core shows the error to the user so they have feedback instead of dumping an exception or a white page. And the same applies if you want to execute a recipe that contains errors. Demos Dynamic Index Tables When using YesSql index tables, you have to build these index tables using code. This solution provides you with a way to build index tables without the need to write code. Using the admin UI, you can select the content type you want to index and you can add the table columns using a nice UI. You can also use a script to execute to build the column value mapping. Here, you can return how you wanted to be your content item indexed. In the screen below, you can see the index table for the content type called Comic Book. In the Map Script editor, we defined what we should need to return when retrieving the values inside the DisplayText, IssueVolumeNumber, and ReleaseDate columns. After that, if you do a SELECT * query for this index table, you may notice that the table contains the columns defined in the previous step. And it's just the top of everything this feature offers. If you are curious about the details, check out this demo video on YouTube for more! News from the community Orchard Harvest 2024 date and location Get ready to power up your Orchard skills at Orchard Harvest Conference 2024! Join us on September 12th-13th at the Orleans Hotel and Casino in lively Las Vegas for two days packed with learning, coding, and community fun. What can you expect at Orchard Harvest Conference 2024? Hands-On Workshops: Elevate your coding game with interactive sessions led by industry experts. Insider Insights: Learn best practices, advanced techniques, and real-world insights from qualified developers. Global Connections: Connect with fellow enthusiasts, exchange ideas, and forge meaningful relationships within the Orchard community. Special Perks: Participants get exclusive discounts on accommodations at the Orleans Hotel and Casino. Can't wait until September? Check out recordings from last year's special online Orchard Harvest on our YouTube channel here. Ready to be a part of something extraordinary? Reserve your spot today and take advantage of early-bird pricing at Orchard Harvest Conference 2024. We also opened the registration form for the speakers: https://forms.office.com/e/fewh7hh20d This year's leading themes: Leading up to a v3.0, what will the future Orchard Core look like? What's the role of a CMS nowadays (with the decoupled/headless operating models, and AI development tools) Explore some advanced topics such as Shapes, Placements, Cloud Integrations, Performance, module extensibility, etc. Showcases on implementing Orchard Core in action. We've extended the sign-up period by another 2 weeks, so if you haven't signed up yet, you can still sign up now! Apply to be a speaker until the 29th of June, midnight Anywhere on Earth! We'll notify you whether your talk is selected for Harvest in 1 or 2 weeks after the application period. The chosen speakers will receive complimentary tickets for the event. Want to support our mission? Become a sponsor! Reach out to us at
[email protected] or
[email protected] to explore sponsorship opportunities. Secure your spot today and get ready to level up your skills at Orchard Harvest Conference 2024! See you there! Orchard Dojo Newsletter Lombiq's Orchard Dojo Newsletter has 473 subscribers! We have started this newsletter to inform the community around Orchard of the latest news about the platform. By subscribing to this newsletter, you will get an e-mail whenever a new post is published to Orchard Dojo, including This week in Orchard of course. Do you know of other Orchard enthusiasts who would like to read our weekly articles? Tell them to subscribe here! If you are interested in more news about Orchard and the details of the topics above, don't forget to check out the recording of this Orchard meeting!