SaaS CMS has officially launched! Learn more now.

Graham Carr
May 9, 2024
  409
(3 votes)

A day in the life of an Optimizely Developer - Enabling Opti ID within your application

Hello and welcome to another instalment of A Day In The Life Of An Optimizely developer, in this blog post I will provide details on Optimizely's Opti ID, what it is and how it can easily be enabled within your website.

What is Opti ID

Opti ID offers a centralised login experience, allowing seamless switching between Optimizely products with just one authentication using Okta, Entra ID, or a local login. It also enables centralised user management using the Opti ID Admin Centre.

Opti ID provides the following benefits:

  • Centralized Login with SSO: Enjoy single sign-on (SSO) with support for multi-factor authentication (MFA) using your preferred MFA setup and active directory authentication provider.
  • Application Switching: Switch between applications without needing to re-authenticate.
  • User Administration: Easily manage Opti ID users, groups, and roles from a centralized location.
  • Account and User Dashboard: Access comprehensive usage and billing information through a centralized dashboard.

Businesses investing in marketing technology often face challenges in balancing flexibility and composability within their tech stacks while managing multiple solutions from different providers. Analysts highlight the financial and administrative burdens associated with maintaining diverse best-of-breed point solutions.

Optimizely addresses these challenges by simplifying the adoption and management of digital experience solutions. Whether you choose a single Optimizely product or the entire suite, you gain access to a cohesive solution that can be conveniently accessed and utilized from a unified platform.

How to enable Opti ID

There are a couple of ways of enabling Opti ID within your website, either by SAML or OIDC. I decided to go down the OIDC route so this is what will be covered, however the references section further down provides some links to useful articles on enabling Opti ID.

Install Nuget Package

The first step is to ensure that the following Nuget package is installed in your web project:

Update Startup.cs

You now need to add the following line of code to your Startup.cs class in the ConfigureServices method:

services.AddOptimizelyIdentity(useAsDefault: true);

You need to ensure at this point that if you are not using ASP.Net Identity then you need to remove any code references to:

services.AddCmsAspNetIdentity<TUser>()

Running Opti ID locally

To ensure that you can run Opti ID locally you need to first of all add the following to your appsettings.json file within the Episerver / CMS section (it is worth noting that these values get added automatically when you deploy your website to DXP):

      "OptimizelyIdentity": {
        "InstanceId": "xxx",
        "ClientId": "xxx",
        "ClientSecret": "xxx"
      },

To get the values for InstanceId, ClientId and ClientSecret, you need to head over to PaaSPortal (https://paasportal.episerver.net) and go into the API tab of the correct organisation. You will see a section detailing Opti ID dev key, these are the values that you need to put into your appsettings.json.

Then that is all that is required from a coding perspective, the next step goes beyond the detail of this article however the references section provides links to detail on how you configure Entra or Okta to allow authentication, authorisation and synchronisation of users and groups.

In conclusion, Opti ID is a great solution for organisations who have multiple Optimizely products that they want to be able to access via an integrated SSO solution.

References

https://support.optimizely.com/hc/en-us/articles/18127857412493-Install-Opti-ID-for-CMS 
https://support.optimizely.com/hc/en-us/articles/18129917620109-Configure-SSO-with-Opti-ID-using-SAML 
https://support.optimizely.com/hc/en-us/articles/18129890210573-Configure-SSO-with-Opti-ID-using-OIDC
https://support.optimizely.com/hc/en-us/articles/17917477783181-Sync-groups-from-your-SSO-provider 

Graham Carr, Lead .NET Developer

I am an experienced Lead .Net Developer with over 25 years’ experience in a wide range of products and technologies. I have helped companies deliver their digital vision from concept all the way through to delivery. I have a particular passion for DXPs (Digital Experience Platforms) and am a certified developer for products such as Optimizely, Umbraco, Kontent.ai and more.

May 09, 2024

Comments

Please login to comment.
Latest blogs
Creating Custom Actors for Optimizely Forms

Optimizely Forms is a powerful tool for creating web forms for various purposes such as registrations, job applications, surveys, etc. By default,...

Nahid | Jul 16, 2024

Optimizely SaaS CMS Concepts and Terminologies

Whether you're a new user of Optimizely CMS or a veteran who have been through the evolution of it, the SaaS CMS is bringing some new concepts and...

Patrick Lam | Jul 15, 2024

How to have a link plugin with extra link id attribute in TinyMce

Introduce Optimizely CMS Editing is using TinyMce for editing rich-text content. We need to use this control a lot in CMS site for kind of WYSWYG...

Binh Nguyen Thi | Jul 13, 2024

Create your first demo site with Optimizely SaaS/Visual Builder

Hello everyone, We are very excited about the launch of our SaaS CMS and the new Visual Builder that comes with it. Since it is the first time you'...

Patrick Lam | Jul 11, 2024