Token Expire Error Flutter

Hi @socialjawn ,

Sincere apologies for the delayed response.

The current usage of secured mode is incorrect. The method createUserToken is intended for obtaining a user access token, not an authentication token.

To obtain an authentication token, follow these steps:

  1. Your front-end (FE) should make a call to retrieve the authentication token.
  2. On the back-end (BE) side, invoke the authentication API (Amity API ) using the userId obtained in step 1 and the securely stored serverKey on the BE side.
  3. Pass the token received from the authentication API back to the front-end.
  4. Utilize the authentication token for logging in."

Amity Support