Enables Google Authentication for YOURLS

Overview

google-auth-yourls

Enables Google Authentication for YOURLS

Proper documentation coming soon.

For now, here is the very rough documentation:

  1. Download the plugin, move contents to plugins directory and rename to google-auth/
  2. Download and configure Google APIs Client Library for PHP
  3. Create an OAuth 2.0 client ID, and download the resulting JSON file (client_secrets.json)
  4. This plugin allows you to filter access based on domain (i.e. only @mydomain.com addresses)
    • Edit define('APPROVED_DOMAIN', "mydomain.com");
    • If you want anyone with a Google account to get in (you probably don't want that), set to *
      • i.e. define('APPROVED_DOMAIN', "*");
Comments
  • Blank Page

    Blank Page

    @atomarch I have got the client secrets from my google account and placed that file inside the plugins directory. Also I placed the vendor directory inside the plugins. But when I activate the plugin, got a blank page and no errors reported. I didn't miss any settings as you mentioned. Any thoughts would be greatly appreciated?

    opened by sathish1981 3
  • Allows Users from Unauthorized Domain to login in.

    Allows Users from Unauthorized Domain to login in.

    After login in using an incorrect google account, and getting the message " If you hit refresh on the browser you can still access yourls this is obviously very insecure. screenshot 2017-08-17 at 00 18 09

    Just hit refresh on the browser and then...

    screenshot 2017-08-17 at 00 18 20

    bug 
    opened by sdholbrook 1
  • fix user can still login when fetchAccessTokenWithAuthCode failed

    fix user can still login when fetchAccessTokenWithAuthCode failed

    when it shows "User from Unauthorized Domain.", and we refresh, it will shows us error:

    Fatal error: Uncaught Google_Service_Exception: { "error": { "code": 401, "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "errors": [ { "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "domain": "global", "reason": "unauthorized" } ], "status": "UNAUTHENTICATED" } } in /var/www/html/user/plugins/google-auth/src/Google/Http/REST.php:118 Stack trace: #0 /var/www/html/user/plugins/google-auth/src/Google/Http/REST.php(94): Google_Http_REST::decodeHttpResponse(Object(GuzzleHttp\Psr7\Response), Object(GuzzleHttp\Psr7\Request), 'Google_Service_...') #1 /var/www/html/user/plugins/google-auth/src/Google/Task/Runner in /var/www/html/user/plugins/google-auth/src/Google/Http/REST.php on line 118
    

    and when refresh it again, it will redirect us to admin panel page

    this commit will fix that

    opened by weeband 0
  • Check user making request from API

    Check user making request from API

    If the user sends a request with API, the plugin was preventing the request and redirects the Google Login page. Before redirecting I checked user requests come from API and check user credentials are valid.

    opened by seferdemirci 0
  • Class 'Google_Client' not found

    Class 'Google_Client' not found

    Hi,

    I followed the instructions and now get: Fatal error: Uncaught Error: Class 'Google_Client' not found in /var/www/html/user/plugins/google-auth/plugin.php:36

    Please help?

    opened by yusufk 1
  • Roles cannot be assigned with this plugin

    Roles cannot be assigned with this plugin

    @atomarch I am using ur plugin and need to work with roles for different users. After authenticating with google I was landed in admin interface but not able to assign user roles. This will limit our capacity to use ur plugin.

    The problem is current yourls user is not set with google user. So while enabling the auth manager plugin, we are getting authentication failed exception.

    Is it possible to set the google user as current yourls user? Or somehow do we need to write the config file with username and dummy password? So that we can use Auth manger plus with your plugin.

    If you could make the compatibility possible, it’s a great feature to use. Please let me know your thoughts.

    opened by sathish1981 1
  • Hello, Dose the documentation already online?

    Hello, Dose the documentation already online?

    Hello author, I found it is a little difficult for somebody didn't use composer before, I'm a freshman of php.

    Would the detail documentation come out soon?~~

    opened by a2d8a4v 0
Owner
8th Wall
8th Wall
It's a Laravel 8 authentication markdown that will help you to understand and grasp all the underlying functionality for Session and API Authentication

About Auth Starter It's a Laravel 8 authentication markdown that will help you to understand and grasp all the underlying functionality for Session an

Sami Alateya 10 Aug 3, 2022
phpCAS is an authentication library that allows PHP applications to easily authenticate users via a Central Authentication Service (CAS) server.

phpCAS is an authentication library that allows PHP applications to easily authenticate users via a Central Authentication Service (CAS) server.

Apereo Foundation 780 Dec 24, 2022
A One Time Password Authentication package, compatible with Google Authenticator.

Google2FA Google Two-Factor Authentication for PHP Google2FA is a PHP implementation of the Google Two-Factor Authentication Module, supporting the HM

Antonio Carlos Ribeiro 1.6k Dec 30, 2022
Simple PHP Google Authentication Template

php-google-auth A php google authentication page project View Demo · Report Problems About The Project This is a small and easy project that I made to

Antonio 4 Nov 21, 2021
Social OAuth Authentication for Laravel 5. drivers: facebook, github, google, linkedin, weibo, qq, wechat and douban

Social OAuth Authentication for Laravel 5. drivers: facebook, github, google, linkedin, weibo, qq, wechat and douban

安正超 330 Nov 14, 2022
PHP class to generate and verify Google Authenticator 2-factor authentication

Google Authenticator PHP class Copyright (c) 2012-2016, http://www.phpgangsta.de Author: Michael Kliewe, @PHPGangsta and contributors Licensed under t

Michael Kliewe 2.1k Jan 2, 2023
Opauth strategy for Google authentication

Opauth-Google Opauth strategy for Google authentication.

Opauth – PHP Auth Framework 84 Dec 4, 2022
Google Two-Factor Authentication Package for Laravel

Google2FA for Laravel Google Two-Factor Authentication Package for Laravel Google2FA is a PHP implementation of the Google Two-Factor Authentication M

Antonio Carlos Ribeiro 785 Dec 31, 2022
Multi-provider authentication framework for PHP

Opauth is a multi-provider authentication framework for PHP, inspired by OmniAuth for Ruby. Opauth enables PHP applications to do user authentication

Opauth – PHP Auth Framework 1.7k Jan 1, 2023
A framework agnostic authentication & authorization system.

Sentinel Sentinel is a PHP 7.3+ framework agnostic fully-featured authentication & authorization system. It also provides additional features such as

Cartalyst 1.4k Dec 30, 2022
PHP library for Two Factor Authentication (TFA / 2FA)

PHP library for Two Factor Authentication PHP library for two-factor (or multi-factor) authentication using TOTP and QR-codes. Inspired by, based on b

Rob Janssen 896 Dec 30, 2022
Provides a unified interface to local and remote authentication systems.

Aura.Auth Provides authentication functionality and session tracking using various adapters; currently supported adapters are: Apache htpasswd files S

Aura for PHP 125 Sep 28, 2022
Vendor-Agnostic Two-Factor Authentication

Multi-Factor Designed to be a vendor-agnostic implementation of various Two-Factor Authentication solutions. Developed by Paragon Initiative Enterpris

Paragon Initiative Enterprises 139 Dec 21, 2022
:octocat: Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.

Socialite Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, You can easily use it in any PHP project. 中文文档 This tool no

安正超 1.2k Dec 22, 2022
🔐 JSON Web Token Authentication for Laravel & Lumen

Documentation Documentation for 1.* here For version 0.5.* See the WIKI for documentation. Supported by Auth0 If you want to easily add secure authent

Sean Tymon 10.7k Dec 31, 2022
LDAP Authentication & Management for Laravel

?? Hey there! Looking for something even easier to use for LDAP integration in your Laravel applications? ?? Introducing LdapRecord ?? LdapRecord is t

null 894 Dec 28, 2022
A Simple method to create laravel authentication for an existing laravel project.

Laravel Simple Auth A Simple method to create laravel authentication for an existing laravel project. Indroduction Why I created this kind of package?

Dasun Tharanga 10 Dec 14, 2021
Library to manage HTTP authentication with PHP. Includes ServiceProviders for easy Laravel integration.

Intervention HttpAuth Library to manage HTTP authentication with PHP. Includes ServiceProviders for easy Laravel integration. Installation You can ins

null 69 Jul 14, 2022
KeyAuth is an open source authentication system with cloud-hosted subscriptions available aswell

KeyAuth is an open source authentication system with cloud-hosted subscriptions available aswell

null 158 Dec 23, 2022