Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Middleware/SocialAuthMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,9 @@
{
try {
$provider = $this->_getService($request)->getProvider($providerName);
$accessToken = $provider->getAccessTokenByRequestParameters($request->getQueryParams());
$queryParams = $request->getQueryParams();
$data = !empty($queryParams) ? $queryParams : $request->getData();
$accessToken = $provider->getAccessTokenByRequestParameters($data);
$identity = $provider->getIdentity($accessToken);

if (!$identity->id) {
Expand Down Expand Up @@ -404,7 +406,7 @@

return null;
}

Check failure on line 409 in src/Middleware/SocialAuthMiddleware.php

View workflow job for this annotation

GitHub Actions / cs-stan / Coding Standard & Static Analysis

RiskyTruthyFalsyComparison

src/Middleware/SocialAuthMiddleware.php:409:13: RiskyTruthyFalsyComparison: Operand of type mixed|null contains type mixed, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead. (see https://psalm.dev/356)
$user = null;

if ($profileUserId) {
Expand Down Expand Up @@ -627,7 +629,7 @@
return $redirectUrl;
}

return $this->getConfig('loginRedirect');

Check failure on line 632 in src/Middleware/SocialAuthMiddleware.php

View workflow job for this annotation

GitHub Actions / cs-stan / Coding Standard & Static Analysis

RiskyTruthyFalsyComparison

src/Middleware/SocialAuthMiddleware.php:632:13: RiskyTruthyFalsyComparison: Operand of type mixed|null contains type mixed, which can be falsy and truthy. This can cause possibly unexpected behavior. Use strict comparison instead. (see https://psalm.dev/356)
}

/**
Expand Down
Loading