Opera Mini social login issue with loginradius.com -
we working on react application(voot.com) , live mobile.
live url: https://m-origin.voot.com
we facing many issues opera mini , 1 of them is:
we not able social login using loginradius.com. when click on 'continue facebook', app redirects loginradius.com third party. din't response our server loginradius that's why user not logged in social login.
we using js file loginradius coming http://cdn.loginradius.com/hub/prod/js/custominterface.2.js.
we have written callback funtion expecting loginradius return callback. callback function not calling in opera mini browser rest browsers working fine.
look opera mini open popup (as new tab because of mobile browser). recommendation not open new window in case of mobile devices. follow steps fix problem
1.add template page
<script id="loginradiuscustom_tmpl_mobile" type="text/html"><div class="<%=name%>"> <a class="anchor_<%=name%>" href="javascript:void()" onclick="window.location.href = '<%=endpoint%>&same_window=1&callback=<%=createcurrentroute(window.location.href)%>'"> <span class="icon-image-<%=name%>" ></span> <span class="<%=name%>-text">continue <%=name%></span> </a> </div></script>
2.add method detect mobile devices
function detectmob() { if( navigator.useragent.match(/android/i) || navigator.useragent.match(/webos/i) || navigator.useragent.match(/iphone/i) || navigator.useragent.match(/ipad/i) || navigator.useragent.match(/ipod/i) || navigator.useragent.match(/blackberry/i) || navigator.useragent.match(/windows phone/i) ){ return true; } else { return false; } }
3.replace following line
options.templatename = "loginradiuscustom_tmpl";
with
if(detectmob()){ options.templatename = "loginradiuscustom_tmpl_mobile"; }else{ options.templatename = "loginradiuscustom_tmpl"; }
Comments
Post a Comment