Base solution for your next web application
Open Closed

Invalid RefreshToken Error preventing login on version 13.1.0 Angular #11978


User avatar
0
gryphon644 created

Hey guys I'm facing this issue after running a fresh version of aspnetzero angular.

Could you guys help, please

Update:

This is what my logs say

at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, JwtSecurityToken outerToken, TokenValidationParameters validationParameters, SecurityToken& signatureValidatedToken) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, TokenValidationParameters validationParameters, SecurityToken& validatedToken) at a365.Web.Authentication.JwtBearer.a365AsyncJwtSecurityTokenHandler.ValidateToken(String securityToken, TokenValidationParameters validationParameters) in Web.Core\Authentication\JwtBearer\a365AsyncJwtSecurityTokenHandler.cs:line 42 at a365.Web.Authentication.JwtBearer.a365AsyncJwtBearerHandler.HandleAuthenticateAsync() in Web.Core\Authentication\JwtBearer\a365AsyncJwtBearerHandler.cs:line 141 INFO 2024-04-23 21:51:31,258 [orker] tion.JwtBearer.a365AsyncJwtBearerHandler - Bearer was not authenticated. Failure message: One or more errors occurred. (IDX10225: Lifetime validation failed. The token is missing an Expiration Time. Tokentype: 'System.IdentityModel.Tokens.Jwt.JwtSecurityToken'.) (IDX10225: Lifetime validation failed. The token is missing an Expiration Time. Tokentype: 'System.IdentityModel.Tokens.Jwt.JwtSecurityToken'.)


5 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you run your app using Chrome's incognito mode and see if it works ?

  • User Avatar
    0
    gryphon644 created

    Tried that and it did not work. Here is a quick loom https://www.loom.com/share/870a84250a1245d8a0640328916981cc?sid=15d1c9cf-3cbc-49ac-b976-429f9e0db0e6

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you add packages shown below to your Web.Core.csproj file and see if it fixes the issue ?

    <PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="7.5.1" />
    <PackageReference Include="Microsoft.IdentityModel.Tokens" Version="7.5.1" />
    
  • User Avatar
    0
    gryphon644 created

    It Worked!

  • User Avatar
    0
    ismcagdas created
    Support Team

    Great.