When exchanging the code for tokens, you need to pass the redirect_uri:
In your logincall
controller:
$query = http_build_query([
'grant_type' => 'authorization_code',
'code' => $code,
'redirect_uri' => 'https://fjatsh.dev/logincall'
]);
Let me know if this resolves it!