Cookie Based Authentication with ASP.NET 5 Identity and Angular 2

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

If anyone is interested in timing out the cookie. In the App_Start/Startup.Auth.cs file. From within ConfigureAuth > app.UseCookieAuth... > new CookieAuth... add the parameter: ExpireTimeSpan = TimeSpan.FromSeconds(5) To test, login a authorized page and wait 5+ seconds, then refresh, you should be thrown back to the login page.

vd
Автор

hi ajden...really appreciate your screencasts, they are really good. in your cookie vs token auth screen cast you mentioned that cookie requires use of razor view...is that really necessary...can't we use a cookie auth with just the angular view?

vishalfogla
Автор

Seems easy enough like this with authenticating with the webapi, but what about cookie based authentication (Identity) on angular routing? How would you protect e.g. /admin/* using this method but allowing login page at e.g. auth/login (or admin/login)?

HugRunner