The hotfix lets users login to the website with the email, however the rest api endpoint fails with the error:
Symfony\Component\HttpKernel\Exception\BadRequestHttpException: Sorry, unrecognized username or password. στην Drupal\user\Controller\UserAuthenticationController->login() (Line 239 από /srv/websites/mysite/web/core/modules/user/src/Controller/UserAuthenticationController.php).
Could you please help?
Tri Tran thank you for your code!
I am now receiving the following error: "Failure code: 403; Failure status: PERMISSION_DENIED; Failure message: Permission 'cloudmessaging.messages.create' denied on resource '//cloudresourcemanager.googleapis.com/projects/MYPROJECTNAME' (or it may not exist)."
Any ideas?
Thank you! I have applied the latest patch in #24 and i have succesfully uploaded the file with the credentials.
However, this broke the functionality and it doesn't send notifications anymore. The code I use is similar to the modules documentation:
// Token is generated by app. You'll have to send the token to Drupal.
$fakeToken = 'e3vUiwcvkpY:APA91bEDZzKTIkaL0e-UTwiV6EGi1m5J5PrDMxejm6-d85vdwAgd';
$messageService = \Drupal::service('firebase.message');
$messageService->setRecipients($fakeToken);
$messageService->setNotification([
'title' => 'Title goes here',
'body' => 'Body goes here',
'badge' => 1,
'icon' => 'optional-icon',
'sound' => 'optional-sound',
'click_action' => 'optional-action',
]);
$messageService->setData([
'score' => '3x1',
'date' => '2017-10-10',
'optional' => 'Data is used to send silent pushes. Otherwise, optional.',
]);
$messageService->setOptions(['priority' => 'normal']);
$messageService->send();
It seems that the setNotification does not exist anymore and I am not sure what other changes are done.
Could someone provide me with an example (instructions/code) on how to send a notification after applying the patch?