.external-login if auth.facebook div#fb-root script. window.fbAsyncInit = function() { FB.init({ appId : '#{auth.facebook}', cookie : true, xfbml : true, version : 'v2.8' }); FB.AppEvents.logPageView(); }; (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.10&appId=1124948240960869"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); fb:login-button(scope="public_profile,email", onlogin="checkLoginState();" data-max-rows="1", data-size="large", data-button-type="login_with", data-show-faces="false", data-auto-logout-link="false", data-use-continue-as="false") if auth.google script(src="https://apis.google.com/js/api:client.js") a.login-btn.google-login.float-lg-right i.fab.fa-fw.fa-google span Log in With Google script. var googleUser = {}; var startApp = function() { gapi.load('auth2', function(){ // Retrieve the singleton for the GoogleAuth library and set up the client. auth2 = gapi.auth2.init({ client_id: '#{auth.google}', cookiepolicy: 'single_host_origin', fetch_basic_profile: true }); attachSignin(document.querySelector('.google-login')); }); }; function attachSignin(element) { auth2.attachClickHandler(element, {}, function (googleUser) { let profile = googleUser.getBasicProfile(); let dataTree = { id_token: googleUser.getAuthResponse().id_token, name: profile.getName(), email: profile.getEmail(), image: profile.getImageUrl() }; if (window.googlePOST) { window.googlePOST(dataTree); } }, function(error) { alert('Failed to log you in using Google.'); }); } startApp() if auth.twitter a.login-btn.twitter-login.login-dialog-pop.float-lg-right(href="/api/external/twitter/login") i.fab.fa-fw.fa-twitter span Log in With Twitter if auth.discord a.login-btn.discord-login.login-dialog-pop.float-lg-right(href="/api/external/discord/login") i.fab.fa-fw.fa-discord span Log in With Discord