update on redirect after generating token