xxubai opened a new issue, #13356:
URL: https://github.com/apache/gravitino/issues/13356
### Version
main branch
### Describe what's wrong
When Web V2 uses `gravitino.authenticator.oauth.provider=default`,
the scheduled token refresh fails. After the original token expires,
the next API request returns 401 and redirects the user to the login page.
The issue also exists in `branch-1.3`.
### Error message and/or stacktrace
```text
TypeError: Cannot read properties of undefined (reading 'access_token')
```
### How to reproduce
1. Configure OAuth with `provider=default`.
2. Log in through Web V2.
3. Wait until the access token expires.
4. Access a protected page.
5. The UI redirects to the login page instead of refreshing the token.
### Additional context
The Axios wrapper already returns the response body, but `refreshToken`
incorrectly reads it from `res.data`:
```javascript
const { access_token, expires_in } = res.data
```
It should read directly from `res`, as the initial login does.
The previous fix in #7429 only changed the legacy `web/web` implementation,
not `web-v2/web`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]