Show or hide login and logout links based on login status in asp net core

Show or hide login and logout links based on login status in asp net core

kudvenkat

4 года назад

87,489 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@michielverbeke264
@michielverbeke264 - 29.05.2022 11:07

Who else hates C#?

Ответить
@fiesapi2399
@fiesapi2399 - 25.02.2022 14:05

Excellent presentation as usual.
Please let me know how to prevent the browser back button after logout?

Ответить
@swanandpangam
@swanandpangam - 14.07.2021 09:18

In case you are able to register the user(check in the db) but still not able to signin them then try moving the app.UseAuthentication() upwards in pipeline.

Ответить
@nimicikyang731
@nimicikyang731 - 28.06.2021 12:12

for anyone whose not signing in i was able to fix the issue in StartUp.cs by moving the app.UseAuthentication below app.UseAuthorization means not above UseMvc

Ответить
@garrettmatthews2489
@garrettmatthews2489 - 11.06.2021 23:56

nice

Ответить
@arivomvarungal9271
@arivomvarungal9271 - 20.05.2021 05:30

great problem solver .. thank you sir

Ответить
@dadoudodo8409
@dadoudodo8409 - 24.04.2021 01:03

Thanks a lot for your performance

Ответить
@dilshadahmed775
@dilshadahmed775 - 19.03.2021 08:39

from this part my nav links buttorn are not working .unable to perform any clickevent.
plz help me.
Thanks for the awesome videos brother

Ответить
@john-blair
@john-blair - 22.10.2020 16:54

Excellent video....thank you. FYI a commercial solution would take account of anti forgery tokens and multiple submit attempts for a slow server - but a good basic intro.

Ответить
@muhammedmunshie464
@muhammedmunshie464 - 01.09.2020 13:05

adding app.UseAuthentication(); in startup fixed the problem for signing in user

Ответить
@Abhimanyukumar-vb8bz
@Abhimanyukumar-vb8bz - 25.08.2020 15:19

await signInManager.SignInAsync(user, isPersistent: false);

Console.WriteLine(signInManager.IsSignedIn(User));


Always returns false. In my layout view, the if statement to hide the login and register link never goes away. The user is registered in the database.


Please help someone

Ответить
@adamkhattab
@adamkhattab - 16.05.2020 14:02

hi
thanks
would this still work with firebase

Ответить
@nolimitsREAL
@nolimitsREAL - 13.05.2020 08:08

On the LogOut part. Why it only works with tag button (type="submit") and something else not ? Has something to do that the action is POST ? and needed to be added a form with a property post ?

Ответить
@javaguitarist
@javaguitarist - 23.04.2020 17:12

Dear @kudvenkat, on the blog page, there is a small typo. This:
@if (SignInManager.IsSignedIn(User))
should be:
@if (signInManager.IsSignedIn(User))

Ответить
@fehl9249
@fehl9249 - 19.04.2020 01:22

await signInManager.SignInAsync(user, isPersistent: false);

Console.WriteLine(signInManager.IsSignedIn(User));


Always returns false. In my layout view, the if statement to hide the login and register link never goes away. The user is registered in the database.


FIXED( Under Project menu, I selected Employee Management Properties. Then select Debug. Under Web Server Settings, Enable SSL had ot be checked)

Ответить
@masoudkhodadadi5838
@masoudkhodadadi5838 - 31.03.2020 19:20

Can we use User.Identity.IsAuthenticated instead of signInManager.IsSignedIn()?

Ответить
@dpavlovsky
@dpavlovsky - 20.03.2020 00:28

Kudvenkat, you're a legend.

Ответить
@AshutoshKumar-kt1dd
@AshutoshKumar-kt1dd - 22.02.2020 13:38

Great

Ответить
@mankgwanyanetlaka5012
@mankgwanyanetlaka5012 - 16.11.2019 14:38

Thank you, you are appreciated

Ответить
@husamkibro6184
@husamkibro6184 - 25.09.2019 03:17

Nice , Thank you

Ответить
@stevan_the_google_fotos_studio
@stevan_the_google_fotos_studio - 12.09.2019 12:12

Thanks man
From Brazil.

Ответить
@MmMm-tg5mq
@MmMm-tg5mq - 23.06.2019 11:04

very clear thank you so much ...

Ответить
@RahulKumar-bf3lg
@RahulKumar-bf3lg - 11.06.2019 18:28

Hey!Kudvenkat..
I am a web devwlopper in .net(mvc)
but i want to learn further but i'm getting confused that what should to be learn so please give me advice that what should i learn according to today's demand...please suggest me....

Ответить
@meetit7031
@meetit7031 - 11.06.2019 14:49

Hello, I have problem with identita and Facebook authorization. When I implement facebook to yours identity schema, identity didin`t work. Client get i cookie with token but website not show that user is login... Can you help me?

Ответить
@sakthivel-lc9ni
@sakthivel-lc9ni - 11.06.2019 12:07

Nice explanation sir,

Ответить
@robertmays6097
@robertmays6097 - 11.06.2019 09:59

great delivery

Ответить
@shahidwani6445
@shahidwani6445 - 11.06.2019 05:34

Thank you, sir

Ответить
@shahzaibriaz6552
@shahzaibriaz6552 - 10.06.2019 21:55

How many videos are remaining to Finish this course Tutorials?

Ответить
@shahzaibriaz6552
@shahzaibriaz6552 - 10.06.2019 21:54

Dear Please Upload 3 Tutorials of
.NET Core / Day

Ответить