Token Based Authentication in ASP.Net using JWTs Part 2: Using Refresh Tokens

In Part 1 we setup basic token authentication using JWT’s with asp.net.  Things are setup reasonably but all is not well.  As a developer, you could give the token a lifespan of 30 days and just force the user to re-login after those days but what if you make the user inactive and don’t want him to login anymore?  There must be better way.AJ

Generally, I token has a lifetime of about an hour and when it expires, we want to refresh that token, verifying that the user still has access to the system, etc.  The method that this is handled is using refresh tokens.  A refresh token is returned along with the normal token and it’s stored for when we must refresh normal token.

Starting from our previous app, let’s support refresh tokens.  Note, the completed code for this blog can be found here.

This will require us to track refresh tokens in our database, so first, let’s create the RefreshToken model.

Continue reading “Token Based Authentication in ASP.Net using JWTs Part 2: Using Refresh Tokens”

IBS Solutions Group Presents .NET Core to Development User Group in Lansing, MI

Joseph DotsonOn Thursday, I traveled to the TechSmith Corporation in the Lansing, Michigan area to deliver a presentation about .NET Core, Microsoft’s newest open source cross-compatibility framework.

At the presentation, I discussed some of the platform’s features and functionality, such as dependency injection, logging, user roles/identities, and use cases.

Continue reading “IBS Solutions Group Presents .NET Core to Development User Group in Lansing, MI”

Codemash 2016 – Humanitarian Toolbox

Rick HerrmannFor the second Codemash pre-compiler day I spent the full day working on the Humanitarian Toolbox project @htbox) with Bill Wagner (@billwagner) and Tony Surma (@tonysurma) and 5 other developers.

What is it?

The Humanitarian Toolbox is an open source non-profit organization, that creates software for disaster response teams. To kick things off, Tony gave us an overview of the projects and we pulled the code from GitHub.

Continue reading “Codemash 2016 – Humanitarian Toolbox”