mmacneil / AngularASPNETCore2WebApiAuth

Sample project demonstrating jwt-based authentication with an Angular (v5.2.1) frontend and ASP.NET Core 2 WebApi. Includes both local user registration with .NET Core Identity membership and facebook login scenarios.
https://fullstackmark.com/post/13/jwt-authentication-with-aspnet-core-2-web-api-angular-5-net-core-identity-and-facebook-login
MIT License
470 stars 239 forks source link

Always generate same token at IssueAt and Expiration #4

Closed kevinding0218 closed 6 years ago

kevinding0218 commented 6 years ago

Hello thank you very much for sharing this tutorial and I followed every step, it works great and I like it very much! However, I am not sure it's my error or we need extra implementation that I found each time I login the Auth generates same token information in IssueAt and Expiration field, so if I set my configuration (RequireExpirationTime = true), then after my Expiration of my first time login, my token will always be unauthorized.. Could you please feel free to guide me on that?

Thank you very much! Ran

kevinding0218 commented 6 years ago

I have figured out myself, it's because of the JwtIssuerOptions has the default value set for IssueAt.

mmacneil commented 6 years ago

Hi Kevin - I've been away the past week but glad you found the answer.

Regards, Mark

On Fri, Feb 9, 2018 at 11:43 PM, Kevin Ding notifications@github.com wrote:

I have figured out myself, it's because of the JwtIssuerOptions has the default value set for IssueAt.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mmacneil/AngularASPNETCore2WebApiAuth/issues/4#issuecomment-364623236, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXRu7SRJEOI42RSQJ1YpTytS9EcZ87Kks5tTRBXgaJpZM4SAyPL .