Okta login page is redirecting back to the initial page instead of the secured page even the login is successful


I am trying to use Okta for the authentication of an internal customer experience app.

I followed the instructions in your tutorial for the configuration of Okta login with widget & VueJS . As it is instructed, I used the following code for login redirecting.

login () {

At first, everything works well and the Okta login page directed to the private path after successful login.

However after 10 minutes, - although I did not change anything in code - Okta login page started to redirect back to the initial page instead of PATH_TO_PROTECTED_ROUTE after successful login.

Could you please tell me what causes this and how can I fix it?