AuthenticationTokenProvider.OnCreate runs on EndRequest on some grant types

Dec 7, 2014 at 4:07 PM
Edited Dec 7, 2014 at 4:08 PM
On "Authorization Code Grant" and "Implicit Grant" the OnCreate delegates from AuthenticationTokenProvider are raised on the EndRequest of Asp.

This causes some Ioc containers to already dispose they're lifetime scope, thus not being able to take advantage of the "instance per http request".

Since this events should be backed up by a database, can this events be moved up on the pipeline?

I created a test case, based on the Authorization Server tutorial and using Autofac as a test Ioc.

Should this be an Issue instead of a discussion item?
Jan 4, 2016 at 5:20 PM
Can somebody help out on this one? This issue is pretty annoying..