richardhj / contao-email-token-login Goto Github PK
View Code? Open in Web Editor NEWAlternative login form where your members don't necessarily need a password.
License: GNU Lesser General Public License v3.0
Alternative login form where your members don't necessarily need a password.
License: GNU Lesser General Public License v3.0
regardless of whether a redirect page is defined or the option "Zur zuletzt besuchten Seite" is activated, the logout redirects to an invalid URL. For me, a double slash appears in the URL directly after the domain name:
https://europeanjusticeforum.org//members/materials/
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
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?
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?
it should be possible to set the expiry time as a parameter - e.g. default +2h
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].
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
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)?
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)"} []
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.