title: Cannot apply indexing with [] to an expression of type 'IConfiguration'
body: <p>i need to create a login with jwt . when i use this code :</p>
  
  <pre><code>        private string BuildToken(User user)
      {
  
          var claims = new[] {
              new Claim(JwtRegisteredClaimNames.Sub, user.DisplayName),
              new Claim(JwtRegisteredClaimNames.Email, user.Email),
              new Claim(JwtRegisteredClaimNames.Birthdate, user.BirthDate.ToString()),
              new Claim(JwtRegisteredClaimNames.Jti, Guid.NewGuid().ToString())
          };
  
          var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_config["Jwt:Key"]));
          var creds = new SigningCredentials(key, SecurityAlgorithms.HmacSha256);
  
          var token = new JwtSecurityToken(_config["Jwt:Issuer"],
            _config["Jwt:Issuer"],
            claims,
            expires: DateTime.Now.AddMinutes(30),
            signingCredentials: creds);
  
          return new JwtSecurityTokenHandler().WriteToken(token);
      }
  </code></pre>
  
  <p>it show me this error : </p>
  
  <blockquote>
    <p>Severity   Code    Description Project File    Line    Suppression State
    Error   CS0021  Cannot apply indexing with [] to an expression of type 'IConfiguration' StoreFinal  C:\Users\Mr-Programer\Desktop\New folder\StoreFinal\StoreFinal\Areas\Admin\Controllers\LoginController.cs   65  Active</p>
  </blockquote>
  
  <p>show me in error in this line : <code>var key = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_config["Jwt:Key"]));</code></p>