krille-chan / fluffychat

The cutest instant messenger in the [matrix]
https://fluffychat.im/
GNU Affero General Public License v3.0
1.22k stars 222 forks source link

After successful Authentication - AccessToken is not returning JWT & client.refreshAccessToken() throws exception #1473

Open Prathiv7 opened 1 week ago

Prathiv7 commented 1 week ago

Bug Description

print(client.accessTokenExpiresAt); print(client.accessToken); await client.refreshAccessToken();

Log I/flutter (28245): null I/flutter (28245): syt_Z3Jvb3D0ZXN0_urzfZFrTpiCFvpTRipEv_3d1pav I/flutter (28245): [Matrix] Benchmark: Get Client from store -> 0 ms [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Exception: No refresh token available E/flutter (28245): #0 Client.refreshAccessToken (package:matrix/src/client.dart:294:7) E/flutter (28245): E/flutter (28245): #1 ChatListView.build.. (package:fluffychat/pages/chat_list/chat_list_view.dart:146:31) E/flutter (28245):

Steps to Reproduce

  1. SSO login to matrix homeserver
  2. Programmatically log's access token and call refreshAccessToken fun from matrix's instance

Expected Behavior

AccessToken in JWT format & refreshAccessToken() should refresh new access token

App Version

1.22.0+3535

Additional Platform Information

Android 13 - Moto g32

Additional Context

No response