I'm working on a webapp written in angular that seems to have trouble interacting with the various password managers (Dashlane, LastPass, etc) that are out there. Are there any guidelines around HTML markup and authentication flow to ensure compatibility? This is not just for login flow, but also includes things like password reset, user name changes, and so on.
It appears that this question has already been asked, but not in the context of AngularJS.
From https://lastpass.com/support.php?cmd=showfaq&id=3385
While LastPass can work on most website logins, if you are developing your own site you can help make it LastPass-compatible by using a simple form submit with a username, password, and submit field.
Here's an example:
<form action="https://mypage.com/blah" method="post">
<input type="text" name="username" id="username" value=""/>
<input type="password" name="password" id="password" value=""/>
<input type="submit" value="LOGIN"/>
</form>
As far as what to avoid -- always create the form on page load, even if you hide and show it to people clicking log in, it's better to be there on page load. Avoid ajax for logging in and avoid method=GET
So besides giving name attributes to your controls, LastPass recommends having the login form markup already in the HTML when it is first loaded.
Related
I want my users to write his website on my site and then be sent to gtmetrix.com to start a new test, but without needing to write his website again.
I am trying with this:
<form method="post" action="https://gtmetrix.com/analyze.html">
<input type="text" placeholder="Enter your Website URL"></input>
<input type="submit">CHECK IT</input>
</form>
But i get a
Analysis Error
You tried to analyze an invalid/malformed URL
What i am doing wrong? is possible to do this?
It seems they require the url in the form data field called url.
You must use the following input tag:
<input type="url" name="url" value="" placeholder="Enter your website URL" maxlength="1024" autofocus="" required="">
Also, they could be blocking external referrers. But first try adding the name attribute.
First of all, I don't know if that website allows you to submit that form from external websites. Make sure that's possible!
Seccond of all, you are trying to sent a form without setting the name of the input field. The resource that receives your request don't know anything to do with it.
If you want to analyse websites on your own website, search for services that provide APIs for using it external.
I am not familiar with gtmetrix, but you need to set the name attribute on your input to send it with the request.
Here's the scenario: I made a Drupal site, with permission for 'view published content-->Registered users' (because I want only registered users to view the content). so, the homepage (login page) actually is an 'access denied' page with login block in it's content area. This is making errors in Google Webmaster Tools homepage index. The homepage for a new unregistered visitor is an access denied page.
So I thought of firing the login action through a custom made HTML login form by using action="<!--URL of login page"-->
Is there any option similar to mentioned below ? (the below mentioned code is just opening the login page after hitting submit. I want a code that will successfully perform the login operation)
<form action="http://siteURL/user/login" method="post">
E-mail<input type="text" name="name" value=""></input> <br>
Password<input type="password" name="pass" value=""></input> <br>
Remember me <input type="checkBox" name="rememberMe" checked><br>
<input type="submit" value="Login"></input>
</form>
I think that your problem could be solved using the Views Module. You could create a page in views and set the URL of your new view to the home page at Administer -> Site configuration -> Site information
Additionally if you ever feel the need to edit a theme output, you can override the template files -> https://www.drupal.org/node/173880
I created html form for registration, where user must fill password input.
Actually if "register" button is pressed, then i process form on the server side and i make redirect. Chrome still offering me if i want to save password on this site (probably because it knows that there is password input on tha form, which was submitted). I wanna dissalow this offer from browser when user is registering.
Try setting autocomplete="off" on your input:
<input type="password" name="password" autocomplete="off" />
https://developer.mozilla.org/en-US/docs/Mozilla/How_to_Turn_Off_Form_Autocompletion?redirectlocale=en-US&redirectslug=How_to_Turn_Off_Form_Autocompletion
I'm currently working with objective-c and have run in to a problem concerning javascript. I am connecting to a website through an iphone app and my goal is to login to a html form (Login.jsp)
<label class="login_label">Username</label>
<input autocomplete="off" type="text" value="" name="ssusername" size="20" maxlength="50" />
<label class="login_label">Password</label>
<input autocomplete="off" type="password" name="sspassword" size="20" maxlength="20" value=""/>
I am trying to make a NSUrlConnection to this site in objective-c but the concern is this: If I enter
https://www.login.com/Login.jsp?ssusername=%#&sspassword=%#, username.text, password.text
It will only enter the enter the password in the html form. And when I look at the javascript I suspect it has something to do with the value in the username html code being value=""
My question: Is it possible to, without changing the html code (as I don't have access to it) make a NSUrlConnection passing username and password and retrieving the answer from this html form, or if anyone know why the username wont show when the adress is entered as above?
I think, login method may use POST method and your NSURLConnection is using get method.
You can check at POST with NSURLConnection - NO JSON.
It depends on server side. You can't really change input field value via GET parameters -- it's server-side job.
You can execute JS code to enter username and password and then click login button via UIWebView's stringByEvaluatingJavaScriptFromString function or you can check this site/server documentation for some authentication methods and then use them (like #saturngod suggested).
I tried w3schools but it didn't help and I tried other websites too. I just wanna make a short html script that sends an email to an email address, but I keep reloading my email inbox and nothing comes up. Can you help?
<form action="MAILTO:MY_EMAIL#yahoo.com" method="post" enctype="text/plain">
<input type="text" name="email" value="Email">
<input type="text" name="message" value="Message">
<input value="Submit" type="submit">
</form>
You need to use a server side script here. HTML alone won't help you here. HTML is just the frontend logic. You need some script on backend that accepts this data you submit and actually sends out an email. To take the example in PHP, assuming u have the server set up and all or that your shared
<form action="sendmail.php" method="post" enctype="text/plain">
<input type="text" name="email" value="Email">
<input type="text" name="message" value="Message">
<input value="Submit" type="submit">
</form>
sendmail.php
$email=$_POST['email'];
$message=json_encode($_POST);
$receiver="MY_EMAIL#yahoo.com";
$mailer="mailer#myservice.com";
mail($email,"Message for enquiry or whatever",$message, array("from"=>$mailer));
There were, at some point, browsers that supported forms of this type. However, they're all gone now -- you will need a server-side script to send email. It's impossible to do using HTML alone.
You are confusing a few things.
When you Submit a form, it goes from the client (browser) to your server, which acts upon it. The form action needs to be a URL which handles the request. The mailto: URI scheme is not a valid action to use.
You have two choices:
You can create a mailto: link like this:
Send email
which will open your default email client,
OR
You can put a URL corresponding to an end point on your server, something like
form action="/send/mail"...
and have your server send the email
I believe the easiest way to do this is using a service like Zapier or IFTTT. Both of them offer a way to create Zaps/Applets that can send an email when you post to a specific url.
This is what configuration would look like in IFTTT and Zapier .
IFTTT is simpler to setup, Zapier has more options, like sending to more than one emails. I believe IFTTT only lets you send to your account's email.