ConnectyCube / connectycube-flutter-samples

Code samples for Flutter, based on ConnectyCube platform
https://developers.connectycube.com/flutter/
Apache License 2.0
86 stars 90 forks source link

invalid timestamp error in iphone login #300

Closed richanshah closed 6 months ago

richanshah commented 10 months ago

EADERS flutter: {connection: keep-alive, date: Tue, 12 Sep 2023 06:49:14 GMT, content-length: 46, strict-transport-security: max-age=15768000; includeSubDomains, access-control-expose-headers: CB-Token-ExpirationDate, Date, content-type: application/json; charset=utf-8, server: nginx/1.25.0} flutter: BODY flutter: {"errors":{"timestamp":["invalid timestamp"]}} flutter: flutter: Login error ResponseException: 422: {"errors":{"timestamp":["invalid timestamp"]}}

flutter: POST https://api.connectycube.com/session flutter: HEADERS flutter: {Content-type: application/json, ConnectyCube-REST-API-Version: 0.1.1, CB-SDK: Flutter 2.8.0, CB-Token: } flutter: BODY flutter: {"application_id":"7266","auth_key":"cKYHfvnvsHqX6JX","nonce":"620887497","timestamp":"1696748323","signature":"4480f623a7f9f332f64a965572c429235d66aa11","user":{"login":"Richa","password":"Brain@2023"}} flutter: {"errors":{"timestamp":["invalid timestamp"]}}

@TatankaConCube , please tell me how to resolve this issue

richanshah commented 10 months ago

cant u guys manage for custom timestamp ?

TatankaConCube commented 10 months ago

the time on the device should be the same as our server time or can differ by +-3 sec or less. it means that the time on your device should be configured as Set Automatically or Set time Automatically and Set time zone automatically depending on the device OS.

richanshah commented 10 months ago

Got u Thanks @TatankaConCube

richanshah commented 10 months ago

@TatankaConCube, What if we users has to continue with custom timezone only? there is no other way?

richanshah commented 10 months ago

because it is a blocker for us

TatankaConCube commented 10 months ago

unfortunately, we can't disable it on the shared server because it is one of the parts of the security system. this config can be changed only on the dedicated server

richanshah commented 10 months ago

@TatankaConCube what do you mean by dedicated server ? should we install connectycube on our server?

TatankaConCube commented 10 months ago

you have this option, but it costs some money, you can contact our sales team sales@connectycube.com for more details. the basic pricing provided here

richanshah commented 10 months ago

@TatankaConCube Retention policy , can u explain me a bit? in ur plans

TatankaConCube commented 10 months ago

what do you mean? this is the server-specific config and we can't change it for all users

richanshah commented 10 months ago

no i didnt mean that.

richanshah commented 10 months ago

@TatankaConCube , with custom time zone i am not getting error in andorid but in iphone , so why is that? can we connect for this via call today or tomorow ? we have few queries

richanshah commented 10 months ago

@TatankaConCube , let me know also can u explain me in detail why custom time is issue for u guys?

TatankaConCube commented 10 months ago

unfortunately, I don't have this info, it is the server-side decision and we on the client side just accept this fact. the back end has a long history and I suppose it was necessary due to the requirements of that time