Hello I am wondering how after calling.
public String performTokenRefresh() {
final AuthState state = AuthUtils.readAuthState(context, key);
final AuthorizationService service = new AuthorizationService(context);
state.performActionWithFreshTokens(service, new AuthState.AuthStateAction() {
@Override
public void execute(@Nullable String accessToken, @Nullable String idToken,
@Nullable AuthorizationException ex) {
// TODO
}
});
return state.getAccessToken();
}
it seems by the time the return statement happens the state has not yet updated to contain the new tokenResponse from when the code expires, the accessToken in the execute is up to date only issue is I cant return from that.
Can anyone help me please.
Regards
question from:https://stackoverflow.com/questions/65830178/openid-app-auth-android-send-refreshed-access-token-to-vuejs