Generate bearer token using c#
问题 I have a web application. My requirement is that i need to generate oauth2 bearer token on every login. Currently we are using thinktecture to generate token, but this procedure is taking almost 7 seconds to generate token everytime. Is there any way i can generate token without using thinktecture ? 回答1: If you have created a new ASP.NET Web Application -> Web API with Individual User Accounts . Have a look at App_Start -> Startup.Auth.cs . It should contain something like this: