title: OAUTH2: authorization decision Page isnt coming after successful form login
body: <p>I am writing a form based OAUTH authentication for Getting The Authorization Code.It was supposed to have a "authorization decision Page"  after the Resource Server asks the Resource Owner to authenticate itself and as for authorization to share data.</p>
  
  <p><strong>Below are the server side configs</strong></p>
  
  <p>Authorization Server</p>
  
  <pre><code>@Configuration
  @EnableAuthorizationServer
  public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter {
       @Bean
          public BCryptPasswordEncoder passwordEncoder() {
              return new BCryptPasswordEncoder();
          }
  
      @Override
      public void configure(ClientDetailsServiceConfigurer clients) throws Exception {
          clients.inMemory().withClient("javainuse").secret("{noop}secret").authorizedGrantTypes("authorization_code")
              .scopes("read").authorities("CLIENT");
      }
  }
  </code></pre>
  
  <p>WebSecurity Configurer</p>
  
  <pre><code>@Configuration
  @EnableWebSecurity
  public class EmployeeSecurityConfiguration extends WebSecurityConfigurerAdapter {
  
       @Bean
          @Override
          public AuthenticationManager authenticationManager() throws Exception {
  
              return super.authenticationManager();
          }
  
       @Autowired
       private BCryptPasswordEncoder  passwordEncoder;
  
  
  
      @Override
      public void configure(WebSecurity web) throws Exception {
          web.ignoring().antMatchers("/resources/**");
      }
  
      @Override
      protected void configure(HttpSecurity http) throws Exception {
          http.authorizeRequests().antMatchers("/").permitAll().antMatchers("/user/getEmployeesList")
              .hasAnyRole("ADMIN").anyRequest().authenticated().and().formLogin()
              .permitAll().and().logout().permitAll();
  
          http.csrf().disable();
      }
  
      @Override
      public void configure(AuthenticationManagerBuilder authenticationMgr) throws Exception {
          authenticationMgr.inMemoryAuthentication().withUser("admin").password(passwordEncoder.encode("admin"))
              .authorities("ROLE_ADMIN");
      }
  
  
  }
  </code></pre>
  
  <p><strong>Below are the client side configs</strong></p>
  
  <p>Controller</p>
  
  <pre><code>@Controller
  public class EmployeeController {
  
      @RequestMapping(value = "/getEmployees", method = RequestMethod.GET)
      public ModelAndView getEmployeeInfo() {
          return new ModelAndView("getEmployees");
      }
  
      @RequestMapping(value = "/showEmployees", method = RequestMethod.GET)
      public String getEmployeeInfo1() {
          return "showEmployees";
      }
  }
  </code></pre>
  
  <p>getEmployees.jsp</p>
  
  <pre><code>&lt;%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Add Employee&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h3 style="color: red;"&gt;Add New Employee&lt;/h3&gt;
  
      &lt;div id="addEmployee"&gt;
          &lt;form:form action="http://localhost:8081/oauth/authorize"
              method="post" modelAttribute="emp"&gt;
              &lt;p&gt;
                  &lt;label&gt;Enter Employee Id&lt;/label&gt;
                   &lt;input type="text" name="response_type" value="code" /&gt; 
                   &lt;input type="text" name="client_id" value="javainuse" /&gt;
                   &lt;input type="text" name="redirect_uri" value="http://localhost:8090/showEmployees" /&gt;
                   &lt;input type="text" name="scope" value="read" /&gt; 
                   &lt;input type="SUBMIT" value="Get Employee info" /&gt;
          &lt;/form:form&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>After providing login details on login prompt</p>
  
  <p><a href="https://i.stack.imgur.com/uO7F7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uO7F7.png" alt="enter image description here"></a></p>
  
  <p>i provided the details, after it should have provided me prompt at <a href="http://localhost:8081/oauth/authorize" rel="nofollow noreferrer">http://localhost:8081/oauth/authorize</a></p>
  
  <p><a href="https://i.stack.imgur.com/zFuat.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zFuat.png" alt="enter image description here"></a></p>
  
  <p>it is giving me info on logs </p>
  
  <pre><code>INFO AuthorizationEndpoint : Handling OAuth2 error: error="invalid_request", error_description="At least one redirect_uri must be registered with the client."
  </code></pre>
  
  <p>any help is really appreciated, not sure where i'm doing wrong.
  I'm using Spring Boot 2.0.2.RELEASE.</p>