Email Authentication
Last updated
Was this helpful?
Was this helpful?
To: john@example.com
From: no-reply@form.io
Subject: Register Now
Message: Click here to complete your registration http://myapp.com/?token=lkjsdlkjs90980982l3kjlkjslkjsd....#register// Parse query string
var query = {};
location.search.substr(1).split("&").forEach(function(item) {
query[item.split("=")[0]] = item.split("=")[1] && decodeURIComponent(item.split("=")[1]);
});
// This is what you will need to add to your application.
if (query.token) {
localStorage.setItem('formioToken', query.token);
localStorage.removeItem('formioAppUser');
localStorage.removeItem('formioUser');
window.history.pushState("", "", location.pathname + location.hash);
}