I have implemented social login along with the normal login(Auth).When I try to login through the normal login form,it shows invalid login(for the registered users).Also,when I login through the other method(social login),I am not getting redirected to the index page.I have provided the user.html code below:
{{extend 'layout.html'}}
<h2>
{{=T('Sign Up') if request.args(0) == 'register' else T('Log In') if request.args(0) == 'login' else T(request.args(0).replace('_',' ').title())}}
</h2>
<div id="janrainEngageEmbed"></div>
<div class="container">
<div class="row">
<div id="web2py_user_form" class="col-lg-6">
{{
if request.args(0)=='login':
if not 'register' in auth.settings.actions_disabled:}}
{{ pass
if not 'request_reset_password' in auth.settings.actions_disabled:}}
{{ pass
pass
=form
}}
</div>
</div>
</div>
{{block page_js}}
<head>
<script type="text/javascript">
(function() {
if (typeof window.janrain !== 'object') window.janrain = {};
if (typeof window.janrain.settings !== 'object') window.janrain.settings = {};
janrain.settings.tokenUrl = 'https://energymanagement.pythonanywhere.com/energy_management/default/index';
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/energymanagement/engage.js';
} else {
e.src = 'http://widget-cdn.rpxnow.com/js/lib/energymanagement/engage.js';
}
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(e, s);
})();
</script>
</head>
<script>
jQuery("#web2py_user_form input:visible:enabled:first").focus();
{{if request.args(0)=='register':}}
web2py_validate_entropy(jQuery('#auth_user_password'),100);
{{elif request.args(0)=='change_password':}}
web2py_validate_entropy(jQuery('#no_table_new_password'),100);
{{pass}}
</script>
{{end page_js}}
Enter code here...
When using social login ,it is getting redirected to this(
https://energymanagement.rpxnow.com/redirect?loc=886356b0b22cc3d0fe90facabed8cea552c467e4....which I do not understand).I am doing this for the first time.I have followed the instructions in the manual.Please point out where I am doing wrong.Any help will be highly appreciated.
Regards,
Brooks