goo.gl/bPcyXW : Buy me a Coffee bit.ly/3zktP96 : Updated version of this video bit.ly/2NbLYeT : Next Part bit.ly/2KStqxl : Prev. Part bit.ly/3QiQOYw : CRUD Operations (Angular & .Net Core API) bit.ly/403lUVC : AspNet MVC with Identity Core bit.ly/3Ktqess : MEAN Stack CRUD bit.ly/47yygKq : (Angular & .Net Core API) More Videos bit.ly/4fSmgXP : React & .Net Core API Videos
Found this helpful in understanding authservice. Angular has developed over the course of 3 years, so many structural changes are there, including generics and return type, but the main logic helped me a lot in understanding the front-end as I'm new to angular. Thanks a lot.
Hello CodeAffection.. here integration with WebAPI is based on Token based Authentication. Could you also post a toutorial based on JWT? Not to mention, Your effort here is much much appreciated ! I followed it thoroughly.
Just what i needed. We're having the same flow with interceptor/WebApi/Owin/JWT auth setup in AngularJs but will need to rebuild to Angular 4. Big thumbs up!
Hello sir, can we use our own legacy User table with OWIN for Token Based Authentication? I already have a web application with Forms Authentication implemented, and I want to extend this application for Token Based Authentication for Mobile App client.
[ts] Property 'do' does not exist on type 'Observable'. For all those with this problem, 'do' has been changed to 'tap' in angular 6. And you should use piping instead of chaining.
Awesome tutorial. It made my day. I spent this 1 hr like 5 minutes. completed attached myself during your explanation. Hats off to your effort. Moreover Knowledge pack tutorial. I was looking for this exactly.
I was having trouble with CORS while trying to make sign in Angular2 + webAPI2 - until watched your vid - I needed to add cors package - Microsoft.Owin.Cors and app.UseCors(CorsOptions.AllowAll); in ConfigureAuth method of the Startup.cs file ... Thank you very much!
This is really awesome! Thank you so much for this, Please address on these issues pls: 1. But when I'am logged in and If I refresh, url changes from localhost:4200/home to localhost:4200/. 2. I am logged in and I hit browser's back button, the login screen shows up. These both are really important aspects to keep affixed in login/signup contexts. Please address on this. That'll be very great.
Hello! I am using the mat-tab-nav-bar from AngularMaterials. But if i open the tab the User gets created again and with it a tab page in a tab page. How can i just create the Login but not the whole user again?
If i copy the token from localstorage then I logout from the app did the token not work again for any request? where is the logout process at server side?
can someone told me where the token generated and who is the responsible for token generation after validate the username or password. From Angular side we are passing token in header then in web api who will authenticate that token is correct or not ?
Nice video could you please make video on Angulr state management with reduex .its nice to see your all video but for making complete Angulr apps we need to maintain state too. Please do the needful
LocalStorage is even secure than cookie. It only work under one domain and expire when the session end. No way to grab it unless someone sit at victim computer and copy it.
hi, i see this video tutorial for implement login in my app. I have create angular application whit aspnet core 2.1 in VS2017 in this project it have the startup class exist. I can update this class or i do create a startup class in web api project? thanks
hi, i have an issue when i add the data to userClaims. the error is the next " Cannot read property 'nombreAlumno' of undefined ". can you help me thanks
I couldnot work with auth.interceptor.ts file because Angular changed do operator to tap and I didnot manage it. I added the token to every request header so itworks well. Thank you somuch these authorization series ...
glad you found the video helpful and thanks for the comment. regarding interceptor and use of tap function. I have another angular authentication tutorial but with latest asp.net core, there I have used tap function in interceptor. you can check that here : th-cam.com/video/s2zJ_g-iQvg/w-d-xo.html
My Web API is validating subsequent request with Authorization header using postman but not working properly from front end angular application.if I am calling any method on controller with Authorization header having wrong token then Web API is not validating it and return data to user
Is there a way to prolong the expiration time when the user is still using the application? Like for example if I set the expiration time to 1 hour, it will refresh as long as the user is still using the app. Thanks in advance, great tutorial sir.
is this the right way to return the list of all users ? [Route("api/GetAllUsers") public IEnumerable GetAllUsers() { var k = new ApplicationDbContext(); IEnumerable contxt = k.Users.ToList(); return contxt; }
When we store token in local storage then I copy token from console and in other browser (opera,etc) and set local storage through console and refresh page thy logged in. kindly tell me how
When I use http dont work Authorize!!!, but use http client worked. Do you need to use only httpclient?! when i use http,dont have access to HttpHeaders!
Sir, Your Tutorials are awesome. I have watched your videos. It's a request that to make a user sign in and signup using Firebase because We mostly use that in our project.
Hey Rahul, I have created an angular ui library with material angular that allows user authentication with firebase.It’s easy to use and has many features like “forgot password | reset password | Detect login progress | Sync user authentication with Firestore | support server side rendering for SEO purposes | feedback mechanism on error and on success | dynamic theme, pick up you major color to adapt it to your corporate id | fully responsive and more…” check this out www.npmjs.com/package/ngx-auth-firebaseui live demo can be found here ngx-auth-firebaseui.firebaseapp.com/ Feedback are really appreciated!
@CodAffection. sorry but the documentation say: "One important thing to note about using client-side applications is that the client has to be a public client as there is no secure way to store client credentials in a client-side application. This makes it very important to make sure the redirect URIs you have configured for the client are correct and as specific as possible. To use the JavaScript adapter you must first create a client for your application in the Keycloak Administration Console. Make sure public is selected for Access Type." www.keycloak.org/docs/3.0/securing_apps/topics/oidc/javascript-adapter.html i'm not sure is what you're doing here. i think you should login with the keycloak login for more security.
I am working on jwt authentication with .net core and angular in next few videos. jwt can't be decrypted without jwt security password (which is stored in server).
After successful registration success message not showing. I made some updates even for ngx-toastr. But nothing changed. I am using Angular 6. Could you please suggest anything how can i get the success message after registration?
Hello , that's a very good tutorial ! can you help me , how you return the list of all subscribed users ? how can you manage roles ? if you can do this video : admin role , can acces list of registred users in the website , and a simple users just can acces and see his data , like you have done in login tuto . thank you again
goo.gl/bPcyXW : Buy me a Coffee
bit.ly/3zktP96 : Updated version of this video
bit.ly/2NbLYeT : Next Part
bit.ly/2KStqxl : Prev. Part
bit.ly/3QiQOYw : CRUD Operations (Angular & .Net Core API)
bit.ly/403lUVC : AspNet MVC with Identity Core
bit.ly/3Ktqess : MEAN Stack CRUD
bit.ly/47yygKq : (Angular & .Net Core API) More Videos
bit.ly/4fSmgXP : React & .Net Core API Videos
thanks
Found this helpful in understanding authservice. Angular has developed over the course of 3 years, so many structural changes are there, including generics and return type, but the main logic helped me a lot in understanding the front-end as I'm new to angular. Thanks a lot.
Could you please make a video on Login and Logout with Web API using JWT Token Based Authentication.
Hello CodeAffection.. here integration with WebAPI is based on Token based Authentication. Could you also post a toutorial based on JWT? Not to mention, Your effort here is much much appreciated ! I followed it thoroughly.
Just what i needed. We're having the same flow with interceptor/WebApi/Owin/JWT auth setup in AngularJs but will need to rebuild to Angular 4. Big thumbs up!
Thank you for the wonderful feedback! :) I'm humbled.
I am new in angular and this video is great.
thx a lot. A little bit suffered and completed the task
Hello sir, can we use our own legacy User table with OWIN for Token Based Authentication? I already have a web application with Forms Authentication implemented, and I want to extend this application for Token Based Authentication for Mobile App client.
One of the best tutorial I found on the youtube. Thanks for sharing. Please continue the good work.
That's very kind of you, In the next part we'll role based authorization in angular 5 with web API.
Sir , very good explanation from scratch. Its very useful.
thanks for your effort. Appreciate..
[ts] Property 'do' does not exist on type 'Observable'.
For all those with this problem, 'do' has been changed to 'tap' in angular 6. And you should use piping instead of chaining.
Code can be like this:
return next.handle(clonedRequest).pipe(
tap(
data => {
},
error => {
if (error.status === 401)
{
this.router.navigateByUrl('/login');
}
}
),
finalize(() => {
})
);
Awesome tutorial. It made my day. I spent this 1 hr like 5 minutes. completed attached myself during your explanation. Hats off to your effort. Moreover Knowledge pack tutorial. I was looking for this exactly.
Nice video sir,
If I added this way then my swagger UI Not working? Any way to integrate swagger UI if I am using a way to handle token?
What does this token called owin or oauth token and What is difference between this type of token and jwt.?
Please make it in Angular 10 please You are great
you can use '/' to specify path while creating component like user/sign-in and --skipTests true to stop generating spec file if you dont need it
Thank you so much for this. You have saved me so much frustration.
I still don't know what's the shortcut when you want to auto generate the import hold 'Ctrl' then which key?
Hold Ctrl + Period (.)
Oh, got it, thanks for ur reply, Great Tutorial!
CTRL + ALT + i
good explanation Thanks a lot
Thanks for the great tutorial. I ended up my searching with this.
I was having trouble with CORS while trying to make sign in Angular2 + webAPI2 - until watched your vid - I needed to add cors package - Microsoft.Owin.Cors and app.UseCors(CorsOptions.AllowAll); in ConfigureAuth method of the Startup.cs file ... Thank you very much!
I am glad that you found the video helpful. happy coding
Thanks ! I m beginning in angular. This tutorial is very useful for me!
Glad you found the video helpful.
hello thank you very much for your video. how can i deploy this Application on IIS?
this is excellent and really helpful..is it present on git? may in know the path/ Thanks
Yes, its there in video description as always.
This is really awesome! Thank you so much for this,
Please address on these issues pls:
1. But when I'am logged in and If I refresh, url changes from localhost:4200/home to localhost:4200/.
2. I am logged in and I hit browser's back button, the login screen shows up.
These both are really important aspects to keep affixed in login/signup contexts.
Please address on this. That'll be very great.
Excellent tutorial. You make this topic very easy to comprehend. Thank you so much.
Glad you enjoyed it!
Hello! I am using the mat-tab-nav-bar from AngularMaterials. But if i open the tab the User gets created again and with it a tab page in a tab page. How can i just create the Login but not the whole user again?
Excelent tutorial. One thing though...The action method for "token" is missing in your code example for the controller
If i copy the token from localstorage then I logout from the app did the token not work again for any request? where is the logout process at server side?
Appreciated... Kindly make video how to do authorization using Jwt in Web Api
Thank You. I'll try your suggestion.
This is what I was waiting for😍
Thanks for the comment.
can someone told me where the token generated and who is the responsible for token generation after validate the username or password. From Angular side we are passing token in header then in web api who will authenticate that token is correct or not ?
Hello Your tutorial Are Awesome.. and Helpful... Thanks
You are welcome, let me know if you have any topic to be discussed in Asp.Net or Angular.
hey i get blocked by CORS policy: The 'Access-Control-Allow-Origin' header contains multiple value error in chrome. How can i fix this in my code?
Excellent work, very clear.
How can we change the login and logout button dynamically..means if i have seperate login button which after login chnages to logout
Sir , Your a one of the best teacher in youtuber , Sir anyvideo forget password angular 7 and using web api ??
thanks for the comment. Sorry, no video for forgot password.
@@CodAffection okay sir
Nice video could you please make video on Angulr state management with reduex .its nice to see your all video but for making complete Angulr apps we need to maintain state too. Please do the needful
right now, I'm not into Redux, may be later.
Did you have any video for google/facebook authentication with angular?
not yet.
This example can be used in a real application, or i should look for other examples? How about a JWT?
Probably I will upload JWT Authentication tutorial with .Net Core Web API and Angular 7.
@@CodAffection why Core? is it different to net framework?
I love this tutorial, Thanks a lot, Finally I made the login and other stuffs on my Angular 5 MVC 5 Application
Is it secured way to access the web api? Because you maintain token from client side. Same way whoever can able hack the webapi. Can you clarify?
What are the possibilities ?
we save encrypted in browser local storage.
LocalStorage is even secure than cookie. It only work under one domain and expire when the session end. No way to grab it unless someone sit at victim computer and copy it.
Is it possible add Role/Claim Based Authorization to this project ? and if possible how ?
hi, i see this video tutorial for implement login in my app. I have create angular application whit aspnet core 2.1 in VS2017 in this project it have the startup class exist. I can update this class or i do create a startup class in web api project? thanks
If token expired in middle of the some process, how to handle? Or how to regenerate the token without logout?
Its very nice understanding very well !! thank you
hi, i have an issue when i add the data to userClaims. the error is the next " Cannot read property 'nombreAlumno' of undefined ". can you help me thanks
How did you import using shortcut key ? What was the key
I think you referring to the autosuggestion.
could you mention the time?
Sir can you reply with the shortcut of import statement??
Server side implementation starts at 24:55
I couldnot work with auth.interceptor.ts file because Angular changed do operator to tap and I didnot manage it. I added the token to every request header so itworks well. Thank you somuch these authorization series ...
glad you found the video helpful and thanks for the comment.
regarding interceptor and use of tap function. I have another angular authentication tutorial but with latest asp.net core, there I have used tap function in interceptor. you can check that here : th-cam.com/video/s2zJ_g-iQvg/w-d-xo.html
I learned how to use Auth and thanks once again
thanks for the comment , keep learning and sharing.
Is it possible to use this to connect to external providers (Facebook)?
My Web API is validating subsequent request with Authorization header using postman but not working properly from front end angular application.if I am calling any method on controller with Authorization header having wrong token then Web API is not validating it and return data to user
sir thanx for your tutorial , can u make video on web api + angular7 google,facebook 3rd parity login
How to use refreshed token to call api instead of redirecting to login page?
hi dotnetmob i tried accessing the token api and i was getting an error ,the resource could not be found what should i do please
Is there a way to prolong the expiration time when the user is still using the application? Like for example if I set the expiration time to 1 hour, it will refresh as long as the user is still using the app. Thanks in advance, great tutorial sir.
probably it can be done with http interceptor(but I am not sure)
hello, Nice video thank you, also please let me know is there any possibility to have this project from scratch.
github link is given in video description. is there any thing else I can assist you with ?
Hello i am trying to implement NTLM authentication of webapi which is showing 401 please help ?
Awesome tutorial man,Thank you so so much
Thanks a lot, very good and very clear
Glad you found the video helpful.
Awesome bro... This is very helpful thanks a lot sir..
is this the right way to return the list of all users ?
[Route("api/GetAllUsers")
public IEnumerable GetAllUsers()
{
var k = new ApplicationDbContext();
IEnumerable contxt = k.Users.ToList();
return contxt;
}
Thank you very much, this video has been very helpful
Can u Please explain how to use refresh token?
When we store token in local storage then I copy token from console and in other browser (opera,etc) and set local storage through console and refresh page thy logged in. kindly tell me how
thank you soo much..
When I use http dont work Authorize!!!, but use http client worked. Do you need to use only httpclient?!
when i use http,dont have access to HttpHeaders!
I run your application I am facing this error in console can't able to log in "Failed to load resource: net::ERR_CONNECTION_REFUSED "
Awesome Tutorial with perfect working sample...Infinite Thanks Sir....
please where is the logout button located
how did u imbliment that ?
I cant seem to find the namespace to 'ApplicationDbContext' & I can't seem to figure out were i went wrong.
can these codes go similar in angular 4?
in home compunent how to add another router outlet so there can be some pages
Sir, Your Tutorials are awesome. I have watched your videos. It's a request that to make a user sign in and signup using Firebase because We mostly use that in our project.
I'll try.
Hey Rahul, I have created an angular ui library with material angular that allows user authentication with firebase.It’s easy to use and has many features like “forgot password | reset password | Detect login progress | Sync user authentication with Firestore | support server side rendering for SEO purposes | feedback mechanism on error and on success | dynamic theme, pick up you major color to adapt it to your corporate id | fully responsive and more…” check this out www.npmjs.com/package/ngx-auth-firebaseui
live demo can be found here ngx-auth-firebaseui.firebaseapp.com/
Feedback are really appreciated!
@CodAffection. sorry but the documentation say:
"One important thing to note about using client-side applications is that the client has to be a public client as there is no secure way to store client credentials in a client-side application. This makes it very important to make sure the redirect URIs you have configured for the client are correct and as specific as possible.
To use the JavaScript adapter you must first create a client for your application in the Keycloak Administration Console. Make sure public is selected for Access Type."
www.keycloak.org/docs/3.0/securing_apps/topics/oidc/javascript-adapter.html
i'm not sure is what you're doing here. i think you should login with the keycloak login for more security.
same for the latest version : www.keycloak.org/docs/latest/securing_apps/index.html#_javascript_adapter
I am working on jwt authentication with .net core and angular in next few videos.
jwt can't be decrypted without jwt security password (which is stored in server).
@@CodAffection
Sorry. I was sure you were using keycloak.
I had to lose myself between two videos.
I'm confused..
Awesome tut, thanks for this!
Is there a way to add a new component in Ang5 in Visual Studio ? I dont have that terminal so cant do it via console. :(
you can use your default windows command prompt
Superb exactly what I needed. THANKS!
Hello , Is this using JWT Token
No, But it would be help full to implement JWT Token Authorization.
What is the table name? i don't understand, where insert data? how to configure the tables for insert?
please watch user registration video first : th-cam.com/video/h85_GT62K6A/w-d-xo.html
in min 28:30 which is the using webapi.models
for applicationDbcontext
Watch the first video(User registration) he creates an IdentityModels class which he references here(WebApi.models)
After successful registration success message not showing. I made some updates even for ngx-toastr. But nothing changed. I am using Angular 6. Could you please suggest anything how can i get the success message after registration?
try to set opacity to 1.
stackoverflow.com/a/17640150/4133590
sorry i don't know verify bearer token logout .can you explain clearly ?
What is ApplicationUser ??
can u tell how to logout the user if the token timespan expired
Fantastic tut
Please provide the code u get quick understanding..
hi
i downloaded your application but the registration is not done . can you tell me any other settings there from my side
registration is covered in previous video.
you're amazing..keep posting more angular videos
glad you found the video helpful.
thank u
This is what I was waiting for
Awesome! Glad to hear it worth watching.
Will the userData disappear when i refresh the page when i'm logged in ?
hope not, please check that.
Some times I get crazy how people can code without Google?
watching in 2020.
Can you please implement auto logout when the user is idle for 15 min...I am struggling with that
I'll try in future videos.
What will come inside providerName
Hello , that's a very good tutorial !
can you help me , how you return the list of all subscribed users ?
how can you manage roles ?
if you can do this video : admin role , can acces list of registred users in the website , and a simple users just can acces and see his data , like you have done in login tuto . thank you again
I'm working on it. probably in next video we'll cover role based authentication.
new video tutorial as per your suggestion : th-cam.com/video/Ks5ADKqPrBQ/w-d-xo.html