Git Product home page Git Product logo

google_signin's Introduction

TYPO3 Extension google_signin

This extension makes it possible to sign in in your TYPO3 websites by your Google account. This means fewer passwords and faster logins.

google_signin.gif

The matching property is the email address of the backend or frontend users.

Features

  • Support for backend users
  • Support for frontend users
  • Support of switching Google accounts before login

Requirement

  • TYPO3 CMS 8+
  • HTTPS
  • Basic knowledge about Google API configuration
  • Google account for the ones who need it

Configuration

To be able to sign in by Google, a bit of configuration is required.

1) Create an account on Google Cloud Platform

Go to https://console.cloud.google.com/ and create a new project.

2) Create credentials

Switch to credentials and click button create credentials and choose oauth client ID

step-create-credentials.png

Fill in the following options:

  • Application type: web application
  • Authorized JavaScript origins: Add all domains you are using

step-create-client.png

*Remember the client ID, you will need it later

step-oauth-client-created.png

3) Authorize Ownership

Go to https://www.google.com/webmasters/tools/home?hl=EN and add site by clicking button add property

Add your domain.

Important: Only the recommended method HTML file upload is supported. follow the instructions and press button verify.

Install extension

Install extension as usual. Use composer with composer require georgringer/google-signin or get it from TER (tbd).

Configuration of extension

The settings in the extension manager are required:

  • Add the client ID
  • Enable BE/FE

=======

Usage

Using the extension is very simple:

Backend

By enabling the backend usage in the extension manager, everything is configured.

Frontend

The following tasks need to be done.

First enable the frontend usage in extension manager:

Adapt the template of EXT:felogin. Take a look at the example template which can be found here: EXT:google_signin/Resources/Private/Examples/FrontendLogin.html. The following changes need to be made:

  • Wrap regular fields with <div id="login-regular">...</div>
  • Add the marker ###GOOGLE_SIGNIN_SWITCH_LINK### which is replaced by a link to use the Google signup
  • Add the marker ###GOOGLE_SIGNIN_CONTENT### which is replaced by the content of google_signup like preview of user

Organisations

For organsations, add your organisation name and choose an existing backend or fontend user as a template for new users. A new user will automatically be created when logging in with a google account assigned to the organisation.

Debugging

Take a look at JS errors in the browser console.

Bugs & upcoming features

Take a look at the open issues at https://github.com/georgringer/google_signin/issues.

google_signin's People

Contributors

douweavrotros avatar georgringer avatar oliverklee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

google_signin's Issues

Backend Login

Backend Login funktioniert nicht.
Im Template Backend.html Zeile 28

<script src="https://apis.google.com/js/platform.js?onload=renderButton" async defer></script>

wenn ich das auf

<script src="https://apis.google.com/js/platform.js" onload="renderButton()" async defer></script>

änder kommt auch der Button zum einloggen wieder.

Allow login with google after login expire

There is no possibility to renew the connection within the expire login modal (without password). I don't know if that's an easy thing to do cause it's a TYPO3 core feature but I think that the best thing would be to replace the modal content by two button like "Renew connection" and "Logout".

Otherwise, I'd like to thank you for your work on this nice extension !

Auto create user for Google business accounts

Idea: If a user tries to log in from a google business account, a new user should be created automatically.

A user template ensures a lot of options like creating an admin or creating users.

Further features:

  • Enable for FE
  • Enable for BE

Sync avatar

It would be nice to sync the avatar for BE users from Google => TYPO3

Disconnect button rendered wrong in PHP 7.4

When working on PHP 7.4 the disconnect button in the Typo3 login screen shows the text:
{f:translate(key:'{LLL}disconnect')}. This only occurs on PHP 7.4, the same code works in 7.2

It can be fixed with a simple f:format.raw in the template:
<f:format.raw>{f:translate(key:'{LLL}disconnect')}</f:format.raw>

See also screenshot:
Schermafbeelding 2020-08-14 om 16 56 16

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.