{"action":"opened","issue":{"url":"https://api.github.com/repos/vuejs/vue-router/issues/2139","repository_url":"https://api.github.com/repos/vuejs/vue-router","labels_url":"https://api.github.com/repos/vuejs/vue-router/issues/2139/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/vue-router/issues/2139/comments","events_url":"https://api.github.com/repos/vuejs/vue-router/issues/2139/events","html_url":"https://github.com/vuejs/vue-router/issues/2139","id":310725041,"number":2139,"title":"Router guard not working when coming from page its supposed to redirect if condition does not match","user":{"login":"iamsayantan","id":19422764,"avatar_url":"https://avatars0.githubusercontent.com/u/19422764?v=4","gravatar_id":"","url":"https://api.github.com/users/iamsayantan","html_url":"https://github.com/iamsayantan","followers_url":"https://api.github.com/users/iamsayantan/followers","following_url":"https://api.github.com/users/iamsayantan/following{/other_user}","gists_url":"https://api.github.com/users/iamsayantan/gists{/gist_id}","starred_url":"https://api.github.com/users/iamsayantan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamsayantan/subscriptions","organizations_url":"https://api.github.com/users/iamsayantan/orgs","repos_url":"https://api.github.com/users/iamsayantan/repos","events_url":"https://api.github.com/users/iamsayantan/events{/privacy}","received_events_url":"https://api.github.com/users/iamsayantan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-03T07:31:57Z","updated_at":"2018-04-03T07:31:57Z","closed_at":null,"author_association":"NONE","body":"### Version\r\n2.0.1\r\n\r\n### Reproduction link\r\n[https://jsfiddle.net/jrfd3x89/](https://jsfiddle.net/jrfd3x89/)\r\n\r\n### Steps to reproduce\r\nSo I have three components, Secured, NonSecured and Dummy associated to three routes. Secured routes should be accessed only by users who has access. And the router guard checks for that. If the user does not have permission then navigating the user to NonSecured page. \r\n if you navigate from Dummy to Secured you would be redirected to NonSecured which is what supposed to happen. but if you navigate from NonSecured to Secured page, then you would be allowed to access. \r\n\r\n### What is expected?\r\nIf I have router guard enabled for a route, then the route should not be accessed if the guard logic is not met.\r\n\r\n### What is actually happening?\r\nThe protected route can be accessed if I navigate to the protected route from the page where it redirects if guard logic is not met.\r\n\r\n<!-- generated by vue-issues. DO NOT REMOVE -->"}}
{"actor":{"display_login":"iamsayantan"}}