Bonjour,
Depuis quelque jours, je ne peux plus m’authentifier aupres du serveur homeconnect. Selon les logs, la fonction callback semble etre appelée 2 fois de suite:
[2020-11-14 10:15:39][DEBUG] : Fonction authRequest()
[2020-11-14 10:15:39][DEBUG] : url = https://api.home-connect.com/security/oauth/authorize?scope=IdentifyAppliance%20Monitor%20Settings%20CoffeeMaker-Control%20Dishwasher-Control%20Dryer-Control%20Freezer-Control%20Hood-Control%20Refrigerator-Control%20Washer-Control&redirect_uri=https%3A%2F%2Fxxxxx%2Fplugins%2Fhomeconnect%2Fcore%2Fphp%2Fcallback.php%3Fapikey%3Dxxxxxxxxxxxxxxxx&client_id=xxxxxxxxxxxxxxxx&response_type=code&state=88a4fb19f58697d75d79d2924072d151
[2020-11-14 10:15:39][DEBUG] : Fin de la fonction authRequest()
[2020-11-14 10:15:48][DEBUG] : ┌────────── Callback
[2020-11-14 10:15:48][DEBUG] : │ state = 88a4fb19f58697d75d79d2924072d151
[2020-11-14 10:15:48][DEBUG] : │ stored state = 88a4fb19f58697d75d79d2924072d151
[2020-11-14 10:15:48][DEBUG] : │ code = eyJ...0=
[2020-11-14 10:15:48][DEBUG] : │ apikey = xxxxxxxxxxxxxxxx
[2020-11-14 10:15:48][DEBUG] : │ Code d'authorisation sauvegardé (eyJ...0=).
[2020-11-14 10:15:48][DEBUG] : Fonction tokenRequest()
[2020-11-14 10:15:48][DEBUG] : Url = https://api.home-connect.com/security/oauth/token
[2020-11-14 10:15:48][DEBUG] : Post fields = client_id=xxxxxxxxxxxxxxxx&client_secret=xxxxxxxxxxxxxxxx&redirect_uri=xxxxxxxxxxxxxxxx
[2020-11-14 10:15:49][DEBUG] : Response = Array ( [access_token] => eyJ...SQ [expires_in] => 86400 [id_token] => eyJ...SQ [refresh_token] => eyJ...0= [scope] => Washer-Control Settings IdentifyAppliance Hood-Control Monitor Dishwasher-Control Refrigerator-Control Dryer-Control Freezer-Control CoffeeMaker-Control [token_type] => Bearer )
[2020-11-14 10:15:49][DEBUG] : Token récupéré.
[2020-11-14 10:15:49][DEBUG] : Access token : eyJ...SQ
[2020-11-14 10:15:49][DEBUG] : Refresh token : eyJ...0=
[2020-11-14 10:15:49][DEBUG] : Token type : Bearer
[2020-11-14 10:15:49][DEBUG] : scope : Washer-Control Settings IdentifyAppliance Hood-Control Monitor Dishwasher-Control Refrigerator-Control Dryer-Control Freezer-Control CoffeeMaker-Control
[2020-11-14 10:15:49][DEBUG] : Expires in : 1605431749
[2020-11-14 10:15:49][DEBUG] : Id token : eyJ...SQ
[2020-11-14 10:15:49][DEBUG] : Fin de la fonction tokenRequest()
[2020-11-14 10:15:49][DEBUG] : └────────── Fin de Callback
[2020-11-14 10:15:50][DEBUG] : ┌────────── Callback
[2020-11-14 10:15:50][DEBUG] : │ state = 88a4fb19f58697d75d79d2924072d151
[2020-11-14 10:15:50][DEBUG] : │ stored state = 88a4fb19f58697d75d79d2924072d151
[2020-11-14 10:15:50][DEBUG] : │ code = eyJ...0=
[2020-11-14 10:15:50][DEBUG] : │ apikey = xxxxxxxxxxxxxxxx
[2020-11-14 10:15:50][DEBUG] : │ Code d'authorisation sauvegardé (eyJ...0=).
[2020-11-14 10:15:50][DEBUG] : Fonction tokenRequest()
[2020-11-14 10:15:50][DEBUG] : Url = https://api.home-connect.com/security/oauth/token
[2020-11-14 10:15:50][DEBUG] : Post fields = client_id=xxxxxxxxxxxxxxxx&client_secret=xxxxxxxxxxxxxxxx&redirect_uri=xxxxxxxxxxxxxxxx
[2020-11-14 10:15:50][DEBUG] : Response = Array ( [error] => invalid_grant [error_description] => invalid authorization_code )
[2020-11-14 10:15:50][DEBUG] : [Erreur] (code erreur : 400) : Impossible de récupérer le token.
Avez-vous une idée?
D’avance merci,
R.