Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Darren Hunter 118 posts 209 karma points
    Feb 12, 2024 @ 15:40
    Darren Hunter
    0

    Umbraco 13 2FA

    Hi,

    I am trying to add 2Fa to an umbraco 13 site, I see that the setup files been removed from Umbraco 13, and looking at the document:

    https://docs.umbraco.com/umbraco-cms/reference/security/external-login-providers#static-extension-class

    It says that the

    OpenIdConnectBackOfficeExternalLoginProviderOptions ConfigureAuthentication

    Can be register in Program.CS file but there are no instructions on how to do this, can someone please point me in the correct direction.

    I have tried to move the code over from 10 to 13 but I can't work out how to register it.

  • Darren Hunter 118 posts 209 karma points
    Feb 12, 2024 @ 16:16
    Darren Hunter
    0

    Fixed it.

  • Sam Grammar 8 posts 80 karma points
    Jun 25, 2024 @ 10:15
    Sam Grammar
    0

    Hi Darren,

    I am trying to build 2FA for my Umbraco 13 application. Can you let me know can we get the control once the user is logged in to invoke the 2FA?

    Thanks in adv.

  • Darren Hunter 118 posts 209 karma points
    Jun 26, 2024 @ 14:32
    Darren Hunter
    0

    Our 2FA is for Azure, it was custome written by one of my colleges I lifted it from one of out V10 sites and drop it in to the V13 site with some tweeks to the code.

    Also you need to tweak the Program.CS file to implement the code.

    I believe the code we use is based on Example given in the Umbraco Documentation, but we put our own spin on it to work the way we want it to work.

    Sorry I can't give you our code I am afraid.

  • Darren Hunter 118 posts 209 karma points
    Jun 26, 2024 @ 14:36
    Darren Hunter
    0

    if you look at:

    https://www.jondjones.com/learn-umbraco-cms/umbraco-13-tutorials/how-tos/umbraco-13-upgrade-and-startupcs-to-programcs-refactoring-guide/

    This shows you how to refactor your Program.CS file

    Also you need this:

    WebApplicationBuilder builder = WebApplication.CreateBuilder(args);

    builder.Services.ConfigureOptions

    builder.CreateUmbracoBuilder() .AddBackOffice() .AddWebsite() .AddDeliveryApi() .AddComposers() .ConfigureAuthentication() .Build();

    Hope the above few lines of code help.

Please Sign in or register to post replies

Write your reply to:

Draft