title: spring - oauth2 redirecting to unknown url
body: <p>I'm trying to use OAuth2 in my spring application.</p>
  
  <p>So here is my <a href="https://pastebin.com/xuXeKufs" rel="nofollow noreferrer">pom.xml</a></p>
  
  <p>Now in <code>Giithub-&gt;Profile-&gt;Developer</code>, I have created an OAUth application, </p>
  
  <p>the homepage url is : <em><a href="http://localhost:8080/login" rel="nofollow noreferrer">http://localhost:8080/login</a></em></p>
  
  <p>And callback url is : <em><a href="http://localhost:8080/datum" rel="nofollow noreferrer">http://localhost:8080/datum</a></em></p>
  
  <p>So, whenever I run this application(runs at port 8080) and try to access any url child of <em><a href="http://localhost:8080/" rel="nofollow noreferrer">http://localhost:8080/</a></em> it takes me to <strong>Login</strong> at <em><a href="http://localhost:8080/login" rel="nofollow noreferrer">http://localhost:8080/login</a></em>, now if I log in, it redirects me to a complex url and instantly to <em><a href="http://localhost:8080/oauth2/authorization/github" rel="nofollow noreferrer">http://localhost:8080/oauth2/authorization/github</a></em>. After this doesn't matter how much I try, I always get redirected here.</p>
  
  <p><em><a href="http://localhost:8080/datum" rel="nofollow noreferrer">http://localhost:8080/datum</a></em> is a valid url.</p>
  
  <p>I have added </p>
  
  <pre><code>spring.security.oauth2.client.registration.github.client-id=
  spring.security.oauth2.client.registration.github.client-secret=
  </code></pre>
  
  <p>in <code>application.properties</code></p>
  
  <p><strong>What is wrong here? What am I missing?</strong></p>