Sign-In Widget
Sign-In widget with Default Settings
The Widget
The Code
This is the widget without any customization from the user. The only setting required is the token url which is highlighted below. The following code is the minimum code you need to get the widget up and running on your site. (Javascript in <head> runs asynchronously – will not slow page load.)
<!doctype html>
<html>
<head>
<script type="text/javascript">
(function() {
if (typeof window.janrain !== 'object') window.janrain = {};
window.janrain.settings = {};
janrain.settings.tokenUrl = '__REPLACE_WITH_YOUR_TOKEN_URL__';
function isReady() { janrain.ready = true; };
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded", isReady, false);
} else {
window.attachEvent('onload', isReady);
}
var e = document.createElement('script');
e.type = 'text/javascript';
e.id = 'janrainAuthWidget';
if (document.location.protocol === 'https:') {
e.src = 'https://rpxnow.com/js/lib/widget-examples-default/engage.js';
} else {
e.src = 'http://widget-cdn.rpxnow.com/js/lib/widget-examples-default/engage.js';
}
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(e, s);
})();
</script>
</head>
<body>
<div id="janrainEngageEmbed"></div>
</body>
</html>