Hi, I’ve created a custom login page on my website and login working perfectly. But the problem is the functionality after login. I need the same functionality as provided by wix on default login. Is this possible? If so, then please let me know.
-
I’m not using private members database.
-
I’m getting the values new database where data is registered by new users and then they will be able to login.
-
Once they login, how to store they logged in state to local storage and check & proceed accordingly on the text visit.
Hi,
Before I suggest a solution, I have a quick question. What exactly would you like to happen after someone logs in with your custom login form? Give us as much information as possible so we can let you know if the site behavior that you are trying the create after logging in is actually possible.
Thank you, we await your reply,
Edward
Hi, Thanks for the reply. See, I’ve
User data in userRegistration (Custom Collection not storing/using data in Private Member collection.)
On login, I validate email & password from this collection. Once validation done, I store the required values in local session. This local session help the users to login again without filling up details. This process working perfectly.
Now, when I do login it’s just simple login not considered as Wix User Login by which a person can get special permissions like comment on blog, member pages etc.
What is need is, I want to make this custom login as Wix login without using private members collection. Is this possible?
If you still have any questions or need screenshots before answering then please let me know. I will share asap so that I can find out a solution.
Hi,
To ensure the most efficient way to grant the permissions to users who register to be a member for your site to comment on blogs or have access to member pages, we recommend using the register() function to register the new users to the private members database. At the moment, we do not recommend using a custom database collection to store your site members data.
Best Regards,
Edward
Hi, Thanks for you reply but Wix really hurts me. Neither we can use customization freely nor we can change the design of default pages like “Reset Password”.
Firstly, I spent almost a week to setup custom login and after your reply try to go ahead with the default login with code. But still limitations are there.
Is there any way to use Custom Reset Password Page?
You have three choices for member signup, so why not just create your own signup and login lightboxes with the use of Corvid?
You have the choice of Default, Custom and Corvid, with the Corvid option giving you free reign of design.
https://support.wix.com/en/article/about-the-member-signup-form
https://support.wix.com/en/article/corvid-enabling-custom-site-registration
Plus, as Edward has already mentioned above, storing users passwords in a database on your site is a big no no, for starters you would be liable for any security breach, that is why you should be making use of the Wix CRM API and Wix Users API and if needed their backend versions too.
https://www.wix.com/corvid/reference/wix-crm.html
https://www.wix.com/corvid/reference/wix-crm-backend.html
https://www.wix.com/corvid/reference/wix-users.html
https://www.wix.com/corvid/reference/wix-users-backend.html
Just be aware that Wix CRM is for working with your site contacts, whereas Wix Users is for working with your site members.
What’s the difference between wix-crm and wix-users?
The CRM API contains functionality for working with your site’s contacts. The Users API contains functionality for working with users who are logged-in members. Note that all members are also contacts, but contacts are not necessarily members.
Default login window you can’t add code to, neither the Custom one as that is still automated by Wix, you just have the benefits of adding more fields onto the form itself etc.
Corvid is your only choice for full code use, so use it with register and login functions like here for samples.
basic Signup Lightbox
import wixUsers from 'wix-users';
import wixWindow from 'wix-window';
import wixLocation from 'wix-location';
$w.onReady(function () {
$w("#registerButton").onClick( (event) => {
let email = $w("#email").value;
let password = $w("#password").value;
let first = $w("#firstName").value;
let last = $w("#lastName").value;
wixUsers.register(email, password, {
contactInfo: {
"firstName": $w('#firstName').value,
"lastName": $w('#lastName').value
}
} )
.then( (result) => {
let resultStatus = result.status;
wixWindow.lightbox.close();
wixLocation.to("/sign-in-status"); //Change the URL ending to whatever page you want to send the user to after they log in.
} );
} );
});
You can use this basic example along with this member profile tutorial here.
So whatever user inputs you collect on your signup form and save through the Contact Info options list, then that will appear on the members profile page.
I have used a similar setup on a site of mine and it works perfectly and closes after registering details before returning to home page, then both names will be saved in Contacts and once site member is approved the member details will be added to ‘members’ database from the linked tutorial above.
Then a simple example for login lightbox as well.
import wixUsers from 'wix-users';
import wixLocation from 'wix-location';
import wixWindow from 'wix-window';
$w.onReady(function () {
$w("#forgotPassword").onClick( (event) => {
//wixWindow.lightbox.close()
wixUsers.promptForgotPassword()
.then( ( ) => {
//
} )
.catch( (err) => {
let errorMsg = err; //"The user closed the forgot password dialog"
});
});
});
export function loginButton_click(event) {
let email = $w("#email").value;
let password = $w("#password").value;
wixUsers.login(email, password)
.then( () => {
console.log("User is logged in");
wixLocation.to("/account/my-account"); //Change the URL ending to whatever page you want to send the user to after they log in.
} )
.catch( (err) => {
console.log(err);
$w("#errorMessage").expand(); // You can delete this line if you are not going to add an error message. Use a regular text element set to 'collapse on load' from the Properties Panel.
} );
}
You can not edit the forgot your password window as of yet and that only works for a site member who is not logged in, obviously 
Finally, the Wix Members app adds the collection called Members/PrivateMembersData to your site automatically when you add the app to your site.
https://support.wix.com/en/article/corvid-wix-members-privatemembersdata-collection-fields
If you don’t want that collection, then don’t use the Wix Members app, however you lose the benefits of having it with most of the Wix apps, as shown here on this page.
https://support.wix.com/en/article/about-members-area
Is there any way to create custom forgot password page with “Corvid”?
I’m already using custom login & signup and registering users with Corvid. Is there any way for custom forgot password with Corvid Coding? Also, Is there any possibility to change the Wix Default Login Page link in the blog comment when user is not logged in?