OIDC login Page

When we use OIDC module for login purpose in mendix application we need to enable anonymous user role also in our application. So based on that we can use option to show login page of OIDC through role based home page. I wanted to know is it possible to show the login page of OIDC in someway without enabling anonymous user role?
3 answers

Hey Aryan,

It is not possible to show the login page of OIDC without enabling anonymous users,

Although, you can try a workaround,

Set a CustomSignIn page from the Navigation and then, on that page, use a dataview and set its datasource to Nanoflow, then, in the nanoflow, you can either write a JavaScript action or you can use Open URL activity that redirects you to the OIDC.

Just a suggestion, Try it and let me know.


Hope it helps!


hi Aryan,

as fas as I know this is not possible, as Mendix will then always redirect to the login page. This page is found in the project directory unders deployment → Web → login.html



For security reasons, I wouldn't recommend to enable anonymous users (although the Mendix documentation describes that). Like Jesus Alguacil says, you can define another login URL by customizing the ‘originURI’ cookie and directly point to the OAuth login URL; adapt your index.html file to something similar to this:

<!doctype html>
        <script type="text/javascript">
            // Redirect to unsupported browser page if opened from browser that doesn't support async/arrow functions
            try {
                eval("async () => {}");
            } catch (error) {
                var homeUrl = window.location.origin + window.location.pathname;
                var appUrl = homeUrl.slice(0, homeUrl.lastIndexOf("/") + 1);
                window.location.replace(appUrl + "unsupported-browser.html");
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="theme.compiled.css?{{cachebust}}">
        <link rel="manifest" href="manifest.webmanifest?{{cachebust}}" crossorigin="use-credentials">
    <body dir="ltr">
        <noscript>To use this application, please enable JavaScript.</noscript>
        <div id="content"></div>
            dojoConfig = {
                isDebug: false,
                useCustomLogger: true,
                async: true,
                baseUrl: "mxclientsystem/dojo/",
                cacheBust: "{{cachebust}}",
                rtlRedirect: "index-rtl.html"
            if (!document.cookie || !document.cookie.match(/(^|;)originURI=/gi)) {
                document.cookie = "originURI=/oauth/v2/login" + (window.location.protocol === "https:" ? ";SameSite=None;Secure" : "");
        <script src="mxclientsystem/mxui/mxui.js?6{{cachebust}}"></script>