I want login to my project website without asking username and password from a specified computer in javascript or. Net
I don't think it is possible to login without Username/Email and password to any secured website, unless there security is not so good.
Now a days, all the things on page after login depends on userId and if that unique ID is null system will redirect you to login page.
It can possible to write a script to automatic login to website using Javascript.
The idea is to create a javascript file and store it locally. It should do the login data entering depending on current site address. Just an example using jQuery:
// dont forget to include jQuery code
// preferably with .noConflict() in order not to break the site scripts
if (window.location.indexOf("mail.google.com") > -1) {
// Lets login to Gmail
jQuery("#Email").val("youremail@gmail.com");
jQuery("#Passwd").val("superSecretPassowrd");
jQuery("#gaia_loginform").submit();
}
Now save this as say login.js
Then create a bookmark (in any browser) with this (as an) url:
javascript:document.write("<script type='text/javascript' src='file:///path/to/login.js'></script>");
Now when you go to Gmail and click this bookmark you will get automatically logged in by your script.
Multiply the code blocks in your script, to add more sites in the similar manner. You could even combine it with window.open(...) functionality to open more sites, but that may get the script inclusion more complicated.
Source: https://stackoverflow.com/questions/6248679/automatic-login-script-for-a-website-on-windows-machine
Other links: https://crunchify.com/automatic-html-login-using-post-method-autologin-a-website-on-double-click/
Hope it helps.
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly