Skip to content

Commit

Permalink
Removed facebook login #922
Browse files Browse the repository at this point in the history
  • Loading branch information
Sjors Keuninkx committed Mar 29, 2024
1 parent d2f8cd5 commit d5c00d0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
27 changes: 0 additions & 27 deletions app/src/View/FunctionsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,33 +152,6 @@ function ($start, $end, $format = 'd.m.Y', $separator = ' - ') {
}
}),

/**
* Create link to log in with Facebook
*/
new Twig_SimpleFunction(
'facebookLoginUrl',
function () use ($app) {
if (!$app->config('facebook') || empty($app->config('facebook')['app_id'])) {
// app_id isn't configured
return '';
}

$req = $app->request();
$redirectUrl = $req->getUrl();
$redirectUrl .= $app->urlFor('facebook-callback');

$url = 'https://www.facebook.com/dialog/oauth?';
$url .= http_build_query([
'scope' => 'email',
'client_id' => $app->config('facebook')['app_id'],
'redirect_uri' => $redirectUrl,
]);

return $url;
},
['is_safe' => ['html']]
),

/**
* Create a link to download a QR-Code for the given URL
*/
Expand Down
3 changes: 1 addition & 2 deletions app/templates/_common/login.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<div class="form-group alternative-login">
<div class="already-registered">Already registered?</div>
<a href="{{ urlFor('twitter-login') }}"><img src="/img/sign-in-with-twitter.png" alt="Sign in with Twitter"></a>
<a href="{{ facebookLoginUrl() }}"><img src="/img/login-with-facebook.png" alt="Log In with Facebook"></a>
</div>
<div>
Problems logging in? <br>
Expand All @@ -29,4 +28,4 @@
<a href="{{ urlFor('user-username-reminder') }}">Forgotten&nbsp;username</a>
</div>
<input type="hidden" name="redirect" value="{{ redirect ? redirect : getCurrentUrl() }}">
</form>
</form>

0 comments on commit d5c00d0

Please sign in to comment.