mirror of
https://github.com/flarum/core.git
synced 2025-10-12 07:24:27 +02:00
Add external authenticator (social login) API
Allows registrations to be completed with a pre-confirmed email address and no password.
This commit is contained in:
@@ -50,7 +50,7 @@ class LoginWithHeader implements MiddlewareInterface
|
||||
if (isset($parts[0]) && starts_with($parts[0], $this->prefix)) {
|
||||
$token = substr($parts[0], strlen($this->prefix));
|
||||
|
||||
if ($accessToken = AccessToken::valid($token)) {
|
||||
if (($accessToken = AccessToken::find($token)) && $accessToken->isValid()) {
|
||||
$this->app->instance('flarum.actor', $user = $accessToken->user);
|
||||
|
||||
$user->updateLastSeen()->save();
|
||||
|
Reference in New Issue
Block a user