How to migrate an Orchard 1 application to Orchard Core, support login via username or email address for OpenID - This week in Orchard (28/07/2023)

Gábor Domonkos's avatar
Announcement, Documentation, This week in Orchard, Liquid, OpenAPI

Support login via username or email address for OpenID, Liquid themes shouldn't need Razor support for MVC, and don't forget to take a look at our blog post about how to migrate an Orchard 1 application to Orchard Core! Check out our post for the details!

Orchard Core updates

Support login via username or email address for OpenID

When using the built-in OpenID feature of Orchard Core, you can get an access token by making a POST request to /connect/token endpoint. In the request, you can specify the grant_type, scope, username, password, and client_id. You can use the username in the username parameter, but if you try to use the email address of the user, it won't work.

Trying to get an access token using the email address

According to this discussion thread, there is a change to not allow the username = email. However, there should be a fallback to authenticate by username or email. So, the goal of this change is to be able to use a username or email to log in. As you can see, now the code utilizes the updated GetUserAsync method, which gets the user by a specified username or email address.

The updated GetUserAsync method

Liquid themes shouldn't need Razor support for MVC

When developing a theme, you can decide to use Razor or Liquid files. But of course, you can mix Razor and Liquid files if you want. Originally the Blog Theme was only composed of Razor files that the community migrated step by step to Liquid. And we are only using Liquid files for the Agency Theme and the Coming Soon Theme as well. So, these are themes that currently only use Liquid files. And because of that, we can remove the AddRazorSupportForMvc tags from these themes.

Remove AddRazorSupportForMvc tags

News from the community

How to migrate an Orchard 1 application to Orchard Core

You may have heard about the news that we migrated from our old Orchard 1 website to Orchard Core and modernized our site's look. Our new site turned out great, and we are very happy with it. It represents who we are and what we do as a company. We hope you like it too! For our case study on building the renewed Lombiq.com, including migrating it from Orchard 1, check out How We Renewed and Migrated lombiq.com from Orchard 1 to Orchard Core in the Lombiq blog, and check out this announcement in this video.

If you are also planning to migrate your Orchard 1 website to Orchard Core, and want to read more details about how you could start to migrate your website and content, search no more, we have published a detailed article on Orchard Dojo with some samples as well about how you could start and enjoy the numerous remarkable benefits by migrating to Orchard Core.

How to migrate an Orchard 1 application to Orchard Core

Orchard Dojo Newsletter

Lombiq's Orchard Dojo Newsletter has 491 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!

No Comments

Add a Comment