How I can create a login to my site by only username and password?

Please note that I don’t want email on the place of username (which is by default)

Hello Prathmesh Galphade,

take a look here …
https://www.wix.com/corvid/forum/community-discussion/how-to-assign-random-unique-id-to-every-guest-user-and-link-currency

https://russian-dima.wixsite.com/meinewebsite/user-infos

and here…
https://www.wix.com/corvid/forum/community-discussion/created-a-login-page-but-having-trouble-matching-email-and-confirm-password-help

https://russian-dima.wixsite.com/meinewebsite/blank-9

Perhaps this will help you.

Thanks for reply,
But that does not gave me enough insights to do what i actually want.

Help: Can you suggest a way in which a user can login to the website without gmail or facebook

Without Facebook and Gmail?
The last option would be the normal e-Mail-way i think.

I don’t think that a Log-In into Wix-Log-In-System is possible without e-Mail.

wixUsers.login(email, password)

https://www.wix.com/corvid/reference/wix-users.html#login

The only way is to create his own Log-In-System, but then you can not use services of Wix.

Hello, Thanks for the Reply
Yes I got the point that Wix is unabled the feature to customize login window. If we will be able to customize login window it will be then possible to do it that way.
Vote for that feature here, (Those who want)
https://support.wix.com/en/article/request-customizing-the-design-of-the-member-login-window

Hi Prathmesh :raised_hand_with_fingers_splayed:

You need to build a page or a lightbox if you want with two fields, username and password, then use the provided username to query a database that stores the members emails and usernames, and return the user email, then use the login() function to log the user in with the password he provided and the email you got from the database.

Simple example:

$w('#loginButton').onClick(async()=> {
    let username = $w('#username');
    let password = $w('#password');
    
    await wixData.query('MembersUsernames').eq('username', username).find().then((result) => {
        if (result.length > 0) {
            let email = result.items[0].loginEmail;
            
            wixUsers.login(email, password).then(()=> {
                // handle the case where the login succeeded
            }).catch((err) => {
                // handle the case where the login fails
                console.error(err)
            })
        } else {
            // handle the case where the username is not
            // entered correctly.
            console.warn('Username doesn't exist')
        }
    })
})

Please note that it’s your responsibility to make sure that the usernames are unique, otherwise the login will always fail for the second person who has the same username.

Hope this helps~!
Ahmad