From f608316e896bf53010cd460555c804cda7cacd9f Mon Sep 17 00:00:00 2001 From: Evert Prants Date: Wed, 29 Jan 2020 10:52:49 +0200 Subject: [PATCH] aaa --- views/includes/external.pug | 4 ++-- views/user/login_social.pug | 34 ---------------------------------- 2 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 views/user/login_social.pug diff --git a/views/includes/external.pug b/views/includes/external.pug index eb055c4..dcf2763 100644 --- a/views/includes/external.pug +++ b/views/includes/external.pug @@ -30,11 +30,11 @@ var startApp = function() { gapi.load('auth2', function(){ // Retrieve the singleton for the GoogleAuth library and set up the client. - var auth2 = gapi.auth2.init({ + gapi.auth2.init({ client_id: '#{auth.google}', cookie_policy: 'single_host_origin', fetch_basic_profile: true - }).then(function () { + }).then(function (auth2) { attachSignin(auth2, document.querySelector('.google-login')); }, function (e) { console.error(e); diff --git a/views/user/login_social.pug b/views/user/login_social.pug deleted file mode 100644 index c14dbfb..0000000 --- a/views/user/login_social.pug +++ /dev/null @@ -1,34 +0,0 @@ -extends ../layout.pug -block title - |Icy Network - Log In - -block body - .container.mb-4.mt-4 - h1 Log in - .row - .col-sm-8 - if message.text - if message.error - .alert.alert-danger - span #{message.text} - else - .alert.alert-success - span #{message.text} - form#loginForm(method="POST", action="") - input(type="hidden", name="csrf", value=csrf) - .form-group - label(for="username") Username or Email Address - input.form-control(type="text", name="username", id="username") - .form-group - label(for="password") Password - input.form-control(type="password", name="password", id="password") - button.btn.btn-primary(type="submit") Log in - a(href="/register") Create an account - | · - a(href="/login/reset") Forgot password? - if auth && !registrations - | · - a(href="/login/legacy") Social login - if auth && registrations - aside.col-sm-4 - include ../includes/external.pug