GithubHelp home page GithubHelp logo

richardhj / contao-email-token-login Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 8.0 60 KB

Alternative login form where your members don't necessarily need a password.

License: GNU Lesser General Public License v3.0

PHP 97.79% Twig 2.21%

contao-email-token-login's People

Contributors

ameotoko avatar richardhj avatar zonky2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

contao-email-token-login's Issues

Only fetch modes declared on Doctrine\DBAL\FetchMode are supported by legacy API

When I click on the link in the email I get the following error message. Do you have any idea how I can solve this? I have done the configuration as described.

request.CRITICAL: Uncaught PHP Exception LogicException: "Only fetch modes declared on Doctrine\DBAL\FetchMode are supported by legacy API." at /www/htdocs/xxxxxx/develop/xxxxxx/vendor/doctrine/dbal/src/Result.php line 288 {"exception":"[object] (LogicException(code: 0): Only fetch modes declared on Doctrine\\DBAL\\FetchMode are supported by legacy API. at /www/htdocs/xxxxxx/develop/xxxxxx/vendor/doctrine/dbal/src/Result.php:288)"} []

Contao 4.13.10
PHP 8.0.20
Token Login 1.3.4

Immediate invalidation causes problems

Hallo Richard,
der Token wird ja einerseits nach Ablauf von 48 Stunden invalidiert, andererseits aber auch sofort nach Aufruf des Links.
Nach unseren Erfahrungen führt Letzteres relativ oft zu Problemen in Zusammenhang mit Virencheckern und ähnlicher Security-Software. Da werden dann Links gerne mal vorab von einer Software geprüft, bevor der User überhaupt die E-Mail angezeigt bekommt. Damit sind die Links dann schon nicht mehr gültig, wenn sie geklickt werden.

Meine Frage: Könnte man das sofortige Invalidieren nach dem ersten Aufruf abschalten, so dass nur noch das Zeitlimit über die Gültigkeit des Tokens entscheidet? Oder die Anzahl der möglichen Aufrufe auf mehr als 1 begrenzen?

Fehler nach Aufruf des Login-Links

Hallo Richard,
ich versuche, deine Erweiterung unter Contao 4.7.5 und PHP 7.2 einzusetzen.
Die Notification wird auch bereits verschickt.
Der Link sieht etwa so aus: http://example.com/_contao/t_login/NAPLfE06LjdX7FCBspAtpSHDyITBN4rtBFhZx3pqmnI

Ruft man den Link auf, zeigt Contao eine Fehlerseite.
Im Error-Log steht:

request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "Controller "richardhj.contao_email_token_login.controller.token_login" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"?" at /usr/www/users/[path]/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php line 71 {"exception":"[object] (InvalidArgumentException(code: 0): Controller \"richardhj.contao_email_token_login.controller.token_login\" cannot be fetched from the container because it is private. Did you forget to tag the service with \"controller.service_arguments\"? at /usr/www/users/[path]/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php:71, Error(code: 0): Class 'richardhj.contao_email_token_login.controller.token_login' not found at /usr/www/users/[path]/vendor/symfony/http-kernel/Controller/ControllerResolver.php:133)"} []

Habe ich etwas falsch konfiguriert, oder liegt es an deinem Code?

requirements could not be resolved

Hallo Richard,
ich versuche die Erweiterung unter Contao 4.9.3 zu installieren. Composer stellt aber 1 Problem fest. Leider bin ich nicht so fit, dass ich aus der Meldung richtig schlau werde.
Könntest du bei Gelegenheit einmal einen Blick darauf werfen? Ich könnte natürlich auch die composer.json + die composer.lock zeigen, wenn das hilft.

[2976.2MiB/37.90s] Your requirements could not be resolved to an installable set of packages.
[2976.2MiB/37.91s] 
  Problem 1
    - Conclusion: don't install symfony/security v4.4.10
    - Conclusion: don't install symfony/doctrine-bridge v4.4.10
    - symfony/security v4.2.0 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.2.1 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.2.10 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.2.11 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.2.12 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.2.2 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.2.3 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.2.4 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.2.5 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.2.6 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.2.7 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.2.8 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.2.9 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.3.0 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.3.1 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.3.10 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.3.11 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.3.2 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.3.3 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.3.4 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.3.5 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.3.6 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.3.7 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.3.8 conflicts with symfony/doctrine-bridge[v4.4.10].
    - symfony/security v4.3.9 conflicts with symfony/doctrine-bridge[v4.4.10].
    - Installation request for symfony/doctrine-bridge (locked at v4.4.10) -> satisfiable by symfony/doctrine-bridge[v4.4.10].
    - Conclusion: don't install symfony/security-core v4.4.10|install symfony/security v4.2.0|install symfony/security v4.2.1|install symfony/security v4.2.10|install symfony/security v4.2.11|install symfony/security v4.2.12|install symfony/security v4.2.2|install symfony/security v4.2.3|install symfony/security v4.2.4|install symfony/security v4.2.5|install symfony/security v4.2.6|install symfony/security v4.2.7|install symfony/security v4.2.8|install symfony/security v4.2.9|install symfony/security v4.3.0|install symfony/security v4.3.1|install symfony/security v4.3.10|install symfony/security v4.3.11|install symfony/security v4.3.2|install symfony/security v4.3.3|install symfony/security v4.3.4|install symfony/security v4.3.5|install symfony/security v4.3.6|install symfony/security v4.3.7|install symfony/security v4.3.8|install symfony/security v4.3.9
    - Installation request for richardhj/contao-email-token-login ^1.2 -> satisfiable by richardhj/contao-email-token-login[v1.2.0].
    - don't install symfony/security v4.4.0|don't install symfony/security-core v4.4.10
    - don't install symfony/security v4.4.1|don't install symfony/security-core v4.4.10
    - don't install symfony/security v4.4.2|don't install symfony/security-core v4.4.10
    - don't install symfony/security v4.4.3|don't install symfony/security-core v4.4.10
    - don't install symfony/security v4.4.4|don't install symfony/security-core v4.4.10
    - don't install symfony/security v4.4.5|don't install symfony/security-core v4.4.10
    - don't install symfony/security v4.4.6|don't install symfony/security-core v4.4.10
    - don't install symfony/security v4.4.7|don't install symfony/security-core v4.4.10
    - don't install symfony/security v4.4.8|don't install symfony/security-core v4.4.10
    - don't install symfony/security v4.4.9|don't install symfony/security-core v4.4.10
    - Installation request for symfony/security-core (locked at v4.4.10) -> satisfiable by symfony/security[v4.4.10], symfony/security-core[v4.4.10].
    - Conclusion: don't install symfony/security-csrf v5.1.2|install symfony/security v4.2.0|install symfony/security v4.2.1|install symfony/security v4.2.10|install symfony/security v4.2.11|install symfony/security v4.2.12|install symfony/security v4.2.2|install symfony/security v4.2.3|install symfony/security v4.2.4|install symfony/security v4.2.5|install symfony/security v4.2.6|install symfony/security v4.2.7|install symfony/security v4.2.8|install symfony/security v4.2.9|install symfony/security v4.3.0|install symfony/security v4.3.1|install symfony/security v4.3.10|install symfony/security v4.3.11|install symfony/security v4.3.2|install symfony/security v4.3.3|install symfony/security v4.3.4|install symfony/security v4.3.5|install symfony/security v4.3.6|install symfony/security v4.3.7|install symfony/security v4.3.8|install symfony/security v4.3.9|install symfony/security v4.4.0|install symfony/security v4.4.1|install symfony/security v4.4.10|install symfony/security v4.4.2|install symfony/security v4.4.3|install symfony/security v4.4.4|install symfony/security v4.4.5|install symfony/security v4.4.6|install symfony/security v4.4.7|install symfony/security v4.4.8|install symfony/security v4.4.9
    - richardhj/contao-email-token-login v1.2.0 requires symfony/security-csrf ^4.2 -> satisfiable by symfony/security[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.10, v4.3.11, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.4.0, v4.4.1, v4.4.10, v4.4.2, v4.4.3, v4.4.4, v4.4.5, v4.4.6, v4.4.7, v4.4.8, v4.4.9], symfony/security-csrf[v4.2.0, v4.2.1, v4.2.10, v4.2.11, v4.2.12, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9, v4.3.0, v4.3.1, v4.3.10, v4.3.11, v4.3.2, v4.3.3, v4.3.4, v4.3.5, v4.3.6, v4.3.7, v4.3.8, v4.3.9, v4.4.0, v4.4.1, v4.4.10, v4.4.2, v4.4.3, v4.4.4, v4.4.5, v4.4.6, v4.4.7, v4.4.8, v4.4.9].
    - Can only install one of: symfony/security-csrf[v4.2.0, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.2.1, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.2.10, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.2.11, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.2.12, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.2.2, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.2.3, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.2.4, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.2.5, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.2.6, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.2.7, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.2.8, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.2.9, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.3.0, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.3.1, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.3.10, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.3.11, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.3.2, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.3.3, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.3.4, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.3.5, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.3.6, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.3.7, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.3.8, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.3.9, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.4.0, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.4.1, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.4.10, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.4.2, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.4.3, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.4.4, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.4.5, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.4.6, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.4.7, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.4.8, v5.1.2].
    - Can only install one of: symfony/security-csrf[v4.4.9, v5.1.2].
    - Installation request for symfony/security-csrf (locked at v5.1.2) -> satisfiable by symfony/security-csrf[v5.1.2].

Insert a hook or a fallback url for invalid or expired tokens

The current behavior throws an exception

Oops! An Error Occurred
The server returned a "403 Forbidden".

if the token is invalid or expired.

See https://github.com/richardhj/contao-email-token-login/blob/main/src/Controller/TokenLogin.php#L74

Only in debug mode you get a meaningful output:
Token not found or expired: xyz

It would be nice if there would be a possibility to catch the exception, for example with a hook. Then you could decide what you want to show or if you want to redirect to another page.

Contao 4.13
PHP 8.0

Wrong error output

The extension works fine for me after first tests (Contao 4.12.13) - thanks for that!

However, I noticed the following: if I (intentionally) use a wrong email address, I don't get the error message from the module, but (probably) the one from Contao's own login module ("Anmeldung fehlgeschlagen (Benutzernamen und Passwörter unterscheiden zwischen Groß- und Kleinschreibung)!") This is a bit awkward when this message mentions something about username and password, which you actually don't need now thanks to this extension.

Did I make a mistake or is this a bug?

Also, the output from the module after sending the (correct) email address is in English ("Please check your inbox to proceed with the login.") - can I localize this somehow (DE)?

Error after login, when module is on page

Habe auf Contao 4.9.23 und Token-Login 1.3.3 aktualisiert.
Der Anmeldeprozess funktioniert grundsätzlich (Notification wird versendet, User ist angemeldet).
Es wird aber der folgende Fehler geworfen, sobald man auf die Seite mit dem Token-Login-Modul gelangt.
Als Workaround zeige ich das Modul jetzt nur Gästen.

[2021-12-06 17:23:56] request.CRITICAL: Uncaught PHP Exception TypeError: "date() expects parameter 1 to be string, null given" at /usr/www/users/xxx/vendor/richardhj/contao-email-token-login/src/Module/TokenLogin.php line 92 {"exception":"[object] (TypeError(code: 0): date() expects parameter 1 to be string, null given at /usr/www/users/xxx/vendor/richardhj/contao-email-token-login/src/Module/TokenLogin.php:92)"} []

Not working with Contao 4.9.14

Modul is not working.
I created a notification, the module and put it on the website but if i put a username in the field and send nothing happens. No Errorlog.

Also the translations are not visible.
Only "token_login" for the Module and "member_token_login" for the Notification are visible.

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.