Ok, so problem was that the redirect url for github must be http://localhost:8080/login/oauth2/code/github by default. After changed it, i can reach /secured (but it wouldn't redirect me there right after login - i need to do it manually)