title: How to fix context.password coming null in /Token request
body: <p><strong>Class: Startup</strong></p>
  
  <pre><code>public class Startup
      {
          public void Configuration(IAppBuilder app)
          {
              // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
              // For more information on how to configure your application, visit http://go.microsoft.com/fwlink/?LinkID=316888
              //enable cors origin requests
              app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
  
              var myProvider = new ClinicServerProvider();
              OAuthAuthorizationServerOptions options = new OAuthAuthorizationServerOptions
              {
                  AllowInsecureHttp = true,
                  TokenEndpointPath = new PathString("/api/token"),
                  AccessTokenExpireTimeSpan = TimeSpan.FromDays(30),
                  Provider = myProvider
              };
              app.UseOAuthAuthorizationServer(options);
              app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions());
  
              HttpConfiguration config = new HttpConfiguration();
              WebApiConfig.Register(config);
          }
      }
  </code></pre>
  
  <p><strong>Class: ClinicServerProvider</strong></p>
  
  <pre><code> public class ClinicServerProvider : OAuthAuthorizationServerProvider
      {
          private readonly BoilerplateDbContext _context;
  
          public override async Task GrantResourceOwnerCredentials(OAuthGrantResourceOwnerCredentialsContext context)
          {
              context.OwinContext.Response.Headers.Add("Access-Control-Allow-Origin", new[] { "*" });
  
              var identity = new ClaimsIdentity(context.Options.AuthenticationType);
              UnitOfWork uow = new UnitOfWork(_context);
              string epass = Crypto.EncryptString(context.Password);
              var user = uow.UserRepository.Get(x =&gt; x.Password == epass &amp;&amp; x.UserName == context.UserName &amp;&amp; x.IsActive==true).FirstOrDefault();
  // Other custom code here.
  
  }
  }
  </code></pre>
  
  <p>In the above method..
  I am getting <strong>context.Password</strong> coming null always..
  <br>
   <a href="https://i.stack.imgur.com/soVAZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/soVAZ.png" alt="enter image description here"></a>
  <br>
  Is anybody knows what is the reason?</p>