Disable sign-in and register pages for custom domain

We are using Okta as a Identity Provider, eg only OAuth2 with PKCE, and using custom domain feature, ie okta is serving over id.company.com
Unfortunately we still see all custom pages on id.company.com (sign-in page), as well as other custom (register, 404).
How can we disable them? We would like to make our own registration pages via API call to okta

Hi @Lonli-Lokli,

Sign in page:
If you are using custom domain, you can update sign in widget to include following javascript in the body. You can do the same on Okta error page as well.

As an admin if you need to login, you can use the default Okta URL (example.okta.com) to login.

Registration page:
You can disable registration : https://help.okta.com/en/prod/Content/Topics/users-groups-profiles/usgp-self-service-registration.htm

Other options to look at:

Thank you,
Raj

@rajnadimpalli what javascript should I include?

If you’re just trying to turn off Self-Service Registration, you will want to update your Custom Sign In page as follows:

 <script type="text/javascript">

// "config" object contains default widget configuration
// with any custom overrides defined in your admin settings.
var config = OktaUtil.getSignInWidgetConfig();

// Add the below line
config['features.registration'] = false;

// Render the Okta Sign-In Widget
var oktaSignIn = new OktaSignIn(config);
oktaSignIn.renderEl({ el: '#okta-login-container' },
    OktaUtil.completeLogin,
    function(error) {
        // Logs errors that occur when configuring the widget.
        // Remove or replace this with your own custom error handler.
        console.log(error.message, error);
    }
);
1 Like