thank you for this beautifully explained registry/login implementation!
@yogeshverma26385 ай бұрын
real good work easy to understand , source code , working project ; All in one . really helped me Thankyou.
@PhegonDev5 ай бұрын
I'm glad it helped
@hash13455 ай бұрын
how you have run the project,plz help
@isaacnarteh87013 ай бұрын
Thank you Phegon; you are phenomenal! Great Job! This is the most insightful video ever seen on KZbin. As a new developer, this video provided all that I need to know about authentication with JWT tokens and Spring security. I couldn't have followed anyone else to get a better understanding of these concepts. Keep doing the great work, brother!
@PhegonDev3 ай бұрын
@@isaacnarteh8701 I've had it was helpful. Thanks for sharing Issac 🙏🙏
@marvinlewis41135 ай бұрын
You are a legend! I'm so grateful for your video. From the bottom of my heart, I would like to thank you.
@PhegonDev5 ай бұрын
I appreciate
@marvinlewis41135 ай бұрын
@@PhegonDev Very sorry to bother you, but how would you allow people to stay signed in even after they close the tab?
@kodiq34293 ай бұрын
the best video in whole youtube. It contains everything needed in 2,5h. Crazy work bro !
@PhegonDev3 ай бұрын
@@kodiq3429 😁😁 Thanks Kodiq
@geniuspedia95084 ай бұрын
Thanks a lot for this wonderful video...
@PhegonDev4 ай бұрын
@@geniuspedia9508 🙏🙏
@RyanTaio7 ай бұрын
Amazing Tutorial for the backend. I haven't reached the frontend part yet but I'm sure it's going to be great as well. I was stuck on Spring Security JWT Authorization from 2 weeks and after watching this video I finally understand it. Thank you so much. Now I will be able to focus on some detailed projects.
@PhegonDev7 ай бұрын
👍🏽👍🏽👍🏽👍🏽👍🏽👍🏽👍🏽👍🏽👍🏽👍🏽👍🏽👍🏽
@duongphan9955 ай бұрын
bro saved me, thank you so much
@PhegonDev5 ай бұрын
I'm happy it helped
@nanayaw71599 ай бұрын
Great UI
@PhegonDev9 ай бұрын
Thanks friend
@suraphelojohannes57807 ай бұрын
I got Your video && my Problem get solved Thanks a lot.............. !
@PhegonDev7 ай бұрын
I'm happy tw's helpful. Thanks for your comment 👍🏽
@nadetdevfullstack70419 ай бұрын
Excellent
@PhegonDev9 ай бұрын
Thanks man 🙏🏽
@naigjvdvjdjdbdb9 ай бұрын
Can u help me please
@MatheusCampos-xr5bv8 ай бұрын
very good video, u are awesome
@sbasalan2 ай бұрын
I would be very good choice to follow your video to build a clone of your work. Exciting 😀
@PhegonDev2 ай бұрын
@@sbasalan that's exciting 😊😊 Thanks
@rahimullahhamidi43218 ай бұрын
Very Good Video ❤❤❤❤❤❤❤
@ArchanSai8 ай бұрын
how have you created the String secreteString = "84356...." ? @ TimeStamp - 25:23 in your video
@PhegonDev8 ай бұрын
It's a random values. Just put in long random values
@isaacnarteh87013 ай бұрын
You can randomly generate one for yourself using online java compiler. The java method to do that is below: import java.security.SecureRandom; public class TokenGenerator { private static final String CHARACTERS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; private static final int TOKEN_LENGTH = 100; // Adjust the length as needed public static void main(String[] args) { SecureRandom random = new SecureRandom(); StringBuilder token = new StringBuilder(TOKEN_LENGTH); for (int i = 0; i < TOKEN_LENGTH; i++) { int index = random.nextInt(CHARACTERS.length()); token.append(CHARACTERS.charAt(index)); } System.out.println(token.toString()); } }
@fatimaezzahrasafrani94695 ай бұрын
Why is the token sent in the register function?
@PhegonDev5 ай бұрын
We only want admin to be able to register users. It's an User's Management Portal. We have admin who manages users. More like an enterise organization unboarding and managing her users
@Rida09214 ай бұрын
I have online book store project where I want both user and admin to register themselves. What can bd done
@sbasalan2 ай бұрын
@@Rida0921 have you found a solution what you were looking for?
@thanhtam72199 ай бұрын
I love u! It help me too much! ❤❤
@PhegonDev9 ай бұрын
😃😃 I'm happy it helped. ❤
@ishratJahanEsha-b3g4 ай бұрын
code show a lot of error . to configuration in jwt
@moisesvillalba66156 ай бұрын
Great Video!
@PhegonDev5 ай бұрын
Thanks Moises
@lovekhanna0094 ай бұрын
Can you share same coruse me with angular as front
@PhegonDev4 ай бұрын
Just skip to the frontemd part kzbin.info/www/bejne/fXXFd6qtp7l7jLs&t
@thenula__rathnayaka2 күн бұрын
where is the sql part
@ShirleyG-gm7kv5 ай бұрын
Which should be changed to allow everyone to register?
@PhegonDev5 ай бұрын
For that, The permission role should be changes from ADMIN to USERS at the controller level
@omardaanoun2557 ай бұрын
Great tutorial! i want to know if there is any solution for the page refresh ??
@PhegonDev7 ай бұрын
perform a navigation. That will trigger a refresh. E.g navigate ('/') or to any other page of choice navigate('/login ')
@rryann0884 ай бұрын
how can we also store images pf user efficiently?
@PhegonDev4 ай бұрын
You can store images on the cloud and save the link of that image in your database. Or store the image on a folder in your computer or server and save the path to that image on your database.
@RashidMd-ud4fj9 ай бұрын
❤good
@PhegonDev9 ай бұрын
❤❤
@СайкалБатырбекова-в4у8 ай бұрын
Hello! Thank you for helping students!)) I have a question: is it necessarily to test before creating FRONT-END?
@PhegonDev8 ай бұрын
Yes it is. So you can detect and correct errors if present
@СайкалБатырбекова-в4у8 ай бұрын
@@PhegonDev got it. thanks!!
@lauris52753 ай бұрын
But if I generate random token with extra expiration date + with role admin I will have access to react admin routes no? Is there a way to prevent that from hapening. I dont want anyone to get inside admin panel.
@theBalancedByte16 күн бұрын
I think they can't. Not unless your jwt secret is exposed
@anilkumar-so5uf5 ай бұрын
where to test the backend?
@PhegonDev5 ай бұрын
I used postman
@jenishjustin70652 ай бұрын
how did you make postman where did it came from please expalain it
@PhegonDev2 ай бұрын
download and install postman. It is used for api testing. www.postman.com/downloads/
@enocksigei6 ай бұрын
This is good though the accessToken and refreshToken are the same yet it is not supposed to be like that
@ankitaghadge.13375 ай бұрын
I didn't understand the code. Can u please give us an explanation?
@PhegonDev5 ай бұрын
@@ankitaghadge.1337 I think you'll need a more beginner friendly course. You can look /search separately for spring boot , react course to get acquainted with the basics first
@ankitaghadge.13375 ай бұрын
@@PhegonDev i have basic understanding of spring boot and react js but I am not able to understand this spring security implementation
@ankitaghadge.13376 ай бұрын
There is no getter setter methods in Our user, I am getting so many error in UserManagementService file
@PhegonDev6 ай бұрын
@Data from lombok helpd to auto generate getters and setters. You can use it
@ankitaghadge.13376 ай бұрын
Only login and register API is working rest all admin API are not working even though I have added correct token i got 403 status code
@ankitaghadge.13376 ай бұрын
I downloaded your projects backend zip file then added my database credentials and run the application then I tested in postman then only register and login API is working rest all API anmin/* nothing is working I got status code 403
@ankitaghadge.13376 ай бұрын
Is this because I am using Java 17?
@JamesEric-q4r8 ай бұрын
this is a very good videos especially the aspect of using jwt token for authorization and authentication but i have a question from the frontend aspect why should i have to reload the page whenever am logged in for my logout button to show and the same for the admin aspect for my profile,userManagement, login to show, is it expected to show authomatically whenever am logged in as a user or admin, in the sense of user friendly and then how can i register as an admin in the frontEnd, since the first thing i see when i open the page is a login page, what if am not registered as an admin then how can i register cause for me to login as an admin i must have been registered at the firstPlace cause you are using the registration from postman, please i need a feedback as soon as posible thank you.
@PhegonDev8 ай бұрын
1, In your logout method. Have an implementation to navigate away from the page. This will trigger a component refresh. e.g navigate("/"). 2, For admin registration. You can create a separate component for admin registration. As you would not want the public to register as admin on your platform
@JamesEric-q4r8 ай бұрын
@@PhegonDev thanks it all makes sense now, i forgot using useNavigate from react-router-dom for navigation
@JamesEric-q4r8 ай бұрын
please a follow up question, can you make video of using jwt token for authentication or authorization without user role just authentication and authorization or do you have a video already for it
@titashipuserge39349 күн бұрын
bro why do you pass a bearer token during registration
@PhegonDev9 күн бұрын
@@titashipuserge3934 we want admin to be able to register new users. It's more like an in-house app kind-off. You can modify to suit your use case. Once you understand the concept then cool
@titashipuserge39349 күн бұрын
Thank you very much. Now I understand better. That part really confused me. But I have another question: why was it working fine when you were creating normal users on Postman without passing a token?
@nithinkumarkodipaika9 ай бұрын
when I'am hitting /getallusers endpoint the jwt token is not validating in backend
@PhegonDev9 ай бұрын
check your code again. And add multiple logs to see where the error is. It working fine if followed properly
@ManishKumarSahu-jd2ww8 ай бұрын
yess I am facing the same issue, were you able to solve the 403 forbidden for /get-all-users
@afrazch64467 ай бұрын
@@ManishKumarSahu-jd2ww do you find out how to resolve it?
@ApoorvaLavate7 ай бұрын
how did you fix it?
@hash13455 ай бұрын
plz share its database also
@PhegonDev5 ай бұрын
like how?
@hash13455 ай бұрын
@@PhegonDev plz share sql code as well
@hash13455 ай бұрын
I am not able to run the code
@Afna.abubackerАй бұрын
What is this secret string??? Can we give any ???
@PhegonDevАй бұрын
@@Afna.abubacker Yes. You can give any long characters
@pankajthakur97608 ай бұрын
Hello Phegon dev Great tutorial i have setup it locally . i have issue after login / logout /add new user its not automatically refresh the page i have to relaod page manually?
@PhegonDev8 ай бұрын
you can reinvoke the component to handle a refresh.
@Viki-v4p8 ай бұрын
Bro , I tried to push my spring project in github and it failed , because iam having some aws credentials like keys , bucket name , locations etc in application properties file ...What can i do to push my code?
@PhegonDev8 ай бұрын
You should not push sensitive credentials to public repo, it's not a good practice. Ppl can use those credentials to access your account and disrupt your service. You should save them in an environment variable and refrence it when needed
@Viki-v4p8 ай бұрын
Can I use jasypt to encrypt the credentials???
@PhegonDev8 ай бұрын
@@Viki-v4p sure you can.
@Viki-v4p8 ай бұрын
@@PhegonDev Thanks for the info bro❤️
@uricohavy55226 ай бұрын
I'm getting a 401 unauthorized error when trying to register a new user in Postman. Any ideas what's causing this and how to fix?
@PhegonDev6 ай бұрын
add more logs to your service to see which code is breaking. You shouldn't be passing in an auth token when logging it, but if you are, make sure it is not expired
@GamingMaharajaHDS4 ай бұрын
can i use java17 for same code
@PhegonDev4 ай бұрын
sure you can
@whanderlust039 ай бұрын
hello, i tired following your video but ive encountered an http 403 error right after i started my spring app. i have csrf disabled just like in the video, do you pls have any suggestions on how to fix this problem?
@PhegonDev9 ай бұрын
I can't see what you doing on your code. But if you follow it correctly, it'll work, as it's woking for others.
@ManishKumarSahu-jd2ww8 ай бұрын
hey, were you able to overcome this 403 error, I am facing the same issue
@ManishKumarSahu-jd2ww8 ай бұрын
make "Authorization" as "Authorization " in the JWTAuthFilter
@sriramrajkumar27745 ай бұрын
@@ManishKumarSahu-jd2ww I cant understand
@LewiWanjohi6 ай бұрын
I'm getting a 404 unauthorized error when trying to register a new user in Postman. Any ideas what's causing this and how to fix?
@PhegonDev6 ай бұрын
Add multiple logs to different steps in your service so you can see which code(method) is failing. By doing so, you'll know where the error is coming from
@chirukurisushma55304 ай бұрын
In Github frontend there is app.css code please provide
@PhegonDev4 ай бұрын
the css code not usefull
@NimmagaddaHarikiran5 ай бұрын
why are settind the is accountnotexpired and is password not expiredtrue in the ouruser class
@PhegonDev5 ай бұрын
By default they are expired it is our duty to set and say they are not expired. Else authentication will fail
@pubudunichanikawijesinghe49324 ай бұрын
Thank u very much for sharing ur knowledge.
@PhegonDev4 ай бұрын
Thanks. That a great observation and suggestion. You can call the api path "admin/register". As long we have the admin guard, we are good. That's a great one 👍🏽👍🏽👍🏽
@xiaoming69589 ай бұрын
Please show about refresh token in react js
@Viki-v4p9 ай бұрын
Bro the way that you are handling the exception , can i do it for my companies projects..Is it valid or else i should handle it separately using Exception classes.
@PhegonDev9 ай бұрын
Use a Custom Exception Class
@Viki-v4p9 ай бұрын
@@PhegonDev Can you make the video for exception handling like how it actually to be.
@Viki-v4p9 ай бұрын
Bro ,is Learning spring boot worth? Because whatever content iam searching about spring boot in a websites are too old content and also most of them deprecated ..And I cant find my solutions in both youtube and websites?
@PhegonDev9 ай бұрын
It depends; 1. Are you already working in a company where java is required? If yes, then Spring Boot is worth it. 2. Do you have a strong background in Java? If yes, spring boot is worth it .There are java jobs and those companies most likely are using spring boot. 3. If your primary focus is in python or node or you are working for a company that majors in python or node, then spring-boot isn't worth it. Instead, you can focus on the technology for those languages. 4. If you are relatively new to programming, I’ll suggest you shouldn’t focus solely on spring boot. You should rather give more priority to python. As Python is popular in developing AI models, ML, Quantum computing and more.
@Viki-v4p9 ай бұрын
@@PhegonDevokay ..Thanks for that kind info.
@dcm62677 ай бұрын
Good video. But there's a small problem, I have to manually refresh. Any solution?
@PhegonDev7 ай бұрын
Trigger a change in component state. That can be done by several ways e.g by navigating. navigate ("/").
@dcm62677 ай бұрын
@@PhegonDev Thank you. I used " window.location.reload() ". Sucess.
@zhaolunzhang88317 ай бұрын
Can I ask one question, when I click the frontend at the user management, it shows the error"Cannot read properties of undefined (reading 'map')". Do you know how to fix it? Can I send your email? Thank you.
@zhaolunzhang88317 ай бұрын
Ok, I solved it. Thank you.
@PhegonDev7 ай бұрын
@@zhaolunzhang8831 nice 🙂
@bakiriwalid74097 ай бұрын
this is by far ..the best video ever im jst facing error {statusCode: 500, message: 'No value present'} when i try to login can any one help on it thanks
@PhegonDev7 ай бұрын
Cross check if the login credentials exist in the database. You can add logging to different steps and methods when trying to perform a login. That will determine which method the error is coming from, although I didn't do this on the tutorial but they'll help to know which method is failing
@bakiriwalid74097 ай бұрын
Thanks so much ..i geg it fix was username mismatch ..was my mistake..thanks so much was best tuto ever