Kreya icon indicating copy to clipboard operation
Kreya copied to clipboard

Retry on invalid_grant authentication

Open DominicMCN opened this issue 9 months ago • 5 comments

Describe the bug

When a refresh_token is expired, or environment changed (different credentials needed); a request authentication would fail. We would need to manually go to auth tab and click reset and update.

I vaguely remember a few versions ago, manual reset was not needed.

To Reproduce Steps to reproduce the behavior:

  1. Authenticates with OAuth
  2. Let the token / refresh_token expires ; or change to a different environment which needs reauth
  3. Request would fail

Expected behavior

Kreya retries authentication from the beginning of the OAuth flow at least one

DominicMCN avatar Apr 29 '24 15:04 DominicMCN

Which Kreya version are you using? I am unable to reproduce this with Kreya 1.14.0. Invoking an operation automatically fetches a valid token for me.

When you switch to the details tab in the authentication, does the token show as invalid/expired?

CommonGuy avatar May 01 '24 05:05 CommonGuy

1.14.1-beta 1

It does show as invalid-grant yea. I'll capture a screenshot when it expires again

DominicMCN avatar May 01 '24 10:05 DominicMCN

Screenshot 2024-05-01 at 14 58 05 Screenshot 2024-05-01 at 14 58 18

DominicMCN avatar May 01 '24 13:05 DominicMCN

Ah now I got it. The bug only happens when a refresh token is present, but invalid/expired. We'll fix this in the next release

CommonGuy avatar May 02 '24 07:05 CommonGuy

This has been fixed in the latest beta version and will be released in the next stable version

CommonGuy avatar May 17 '24 13:05 CommonGuy

Kreya 1.15 has just been released, which fixes this.

CommonGuy avatar Jun 12 '24 09:06 CommonGuy