Skip to content

Customize login modal #20

@leog

Description

@leog

Hello!

This is a great plugin, I'm hoping to use it on our Discourse instance for our political party on Uruguay based on IT.

I was wondering if there is any way to customize the lock instance to match our desired look and feel used on our main entry page at https://acceso.partidodigital.org.uy. There we are using the following code:

// Auth0Lock options
var options = {
    container: "lock",
    language: "es",
    theme: {
        logo: "assets/img/logo_text.svg",
        primaryColor: "#F37021"
    },
    allowForgotPassword: true,
    allowLogin: true,
    loginAfterSignUp: false,
    mustAcceptTerms: true,
    languageDictionary: {
        signUpTerms: "Acepto los <a href='/terms' target='_new'>términos de uso</a> y <a href='/privacy' target='_new'>privacidad</a>.",
        title: "Acceso",
        success: {
            signUp: "Registro completado exitosamente. Chequea tu correo para verificar tu dirección y seguir con los próximos pasos."
        }
    },
    additionalSignUpFields: [{
        name: "credencial",
        placeholder: "ingrese su credencial",
        icon: "assets/img/credencial.png",
        validator: function(credencial) {
            function isNumber(n) {
                return !isNaN(parseFloat(n)) && isFinite(n)
            }
            var split = credencial.split(" ");
            return {
                valid: split.length === 2 && !isNumber(split[0]) && isNumber(split[1]),
                hint: "Aseguresé de ingresar su credencial en formato \"ABC 12345\" con un espacio."
            };
        }
    }]
};

Seems like the code used on Discourse comes from a js file corresponding to the client app setup on Auth0 dashboard, but I couldn't see any place to customize the lock options.

Any help would be greatly appreciated.

Regards.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions