Login Validation using | Angular | Java | Spring Boot | Rest Authentication API | MySQL

Поделиться
HTML-код
  • Опубликовано: 27 дек 2024

Комментарии • 91

  • @KhushbooDailyVlogs0506
    @KhushbooDailyVlogs0506 Год назад +2

    very nicely explained.....one request can you please make a video for admin authentication and user authentication using spring security at the backend, I am constantly facing error in that.

    • @thelearningmighty
      @thelearningmighty  Год назад

      Sure will be comming soooon

    • @world4376
      @world4376 Год назад +1

      @@thelearningmighty sir did you make on this

    • @thelearningmighty
      @thelearningmighty  Год назад

      @@world4376 I dint understand what you are trying to say. Could you pl3ase explain

    • @world4376
      @world4376 Год назад +1

      @@thelearningmighty I mean Sir there of lot of changes came in spring security as a beginner struggling lot can you please help us in making one complete video of spring security with jwt based on roles with Angular. Please sir.Thanks in advance sir.

    • @thelearningmighty
      @thelearningmighty  Год назад

      @@world4376 sure I will upload a new video on this. Dont worry

  • @abrahamsecoe87
    @abrahamsecoe87 11 месяцев назад

    Hello sir, please why did you choose to use the old connection way with jdbc instead of using the repository with extends Jparepository? I thought that is the reason why you added JPA dependency?

  • @Maniac5638
    @Maniac5638 Год назад +1

    Hello sir , while running the application initially for database connection...it is saying
    accces denied for user ‘root‘@’localhost’ (using password: No)
    What could be the problem

    • @thelearningmighty
      @thelearningmighty  Год назад

      Cool Good error... First step check the password of your Mysql workbench and the password in code is same . Second step check the driver name which u used in the code for db connection.

  • @AnjaanShah122
    @AnjaanShah122 Год назад +1

    47:37 error on browser This application has no explicit mapping for/error, so you are seeing this as fallback.

  • @divyachouksey5537
    @divyachouksey5537 Год назад

    Nice keep it up👍

  • @zahidch7932
    @zahidch7932 2 года назад +1

    Hi Sir, I have following question, while adding string variables, name, username and password, it shows error, what do I need to select from quick fix?

  • @ameerfalah9659
    @ameerfalah9659 2 года назад

    Hi, I was following your video, and I'm getting an error message
    Whitelabel Error Page
    This application has no explicit mapping for /error, so you are seeing this as a fallback.
    Mon Oct 10 00:07:32 EDT 2022
    There was an unexpected error (type=Not Found, status=404).
    No message available
    Tried everything and checked the web, everything looks correct

    • @thelearningmighty
      @thelearningmighty  2 года назад

      Usually whitelabel error occurs which the Api which you created and endpoint which you are access are not same, so please check the API which you created in controller and the endpoint name has to be the same for example: localhost:8080/this_is_api_name see the name name in the controller. if this issue solved let me know , if not will tell another solution.

    • @ameerfalah9659
      @ameerfalah9659 2 года назад

      @@thelearningmighty Thanks a lot for you prompt reply ... I hate to bother you, but I'm new to this, can you please point me, where can I find the API and the endpoint, is there any other solution so I can continue with your video to finish the project ... Thanks

    • @ameerfalah9659
      @ameerfalah9659 2 года назад +1

      @@thelearningmighty I got it, thanks a lot, I just moved the packages that you created into the main package and worked, continuing the project, thanks

    • @thelearningmighty
      @thelearningmighty  2 года назад +1

      Please do subscribe and share to your friends. 1 Like = Motivation, 1 Subscribe = family

    • @vaddiguruvarun3500
      @vaddiguruvarun3500 2 года назад +1

      @@thelearningmighty bro i followed ur code but i am also getting same error

  • @jadumantar2563
    @jadumantar2563 Год назад +1

    I am getting the error like localhost refused to connect please guide me sir

    • @thelearningmighty
      @thelearningmighty  Год назад

      Okay.. This happen if you dont add @Crossorigin annotation in controller file.

  • @bonton5081
    @bonton5081 2 года назад +2

    Hi someone ca help me, Im gettin error like this :
    Argument of type '(res: boolean) => void' is not assignable to parameter of type '(value: Object) => void'.
    Types of parameters 'res' and 'value' are incompatible.
    Type 'Object' is not assignable to type 'boolean'.
    26 .subscribe((res: boolean) => {
    ~~~~~~~~~~~~~~~~~~~

    • @zahidch7932
      @zahidch7932 2 года назад +1

      I'm having the same error, but still waiting if someone can respond

    • @thelearningmighty
      @thelearningmighty  2 года назад

      I din't get this, please share the error screen shot through mail quickproject131@gmail.com

    • @bonton5081
      @bonton5081 2 года назад +1

      @@thelearningmighty i tried with ypur code, but i getting always the same error, perhaps is deprecated this typology of syntax, i dont know..
      waitng for some solution :)

    • @thelearningmighty
      @thelearningmighty  2 года назад +1

      @@bonton5081 Hi brother

    • @thelearningmighty
      @thelearningmighty  2 года назад +1

      please do share me a screenshot of error through mail(quickproject131@gmail.com)
      and also let me know which version of angular you are using. Note : To check the angular version 1. Open command prompt 2. type command as : ng version

  • @prathyushakillamsetti825
    @prathyushakillamsetti825 2 года назад

    I am getting error at vs code users.ts it doesn't import the string values why??

    • @bonton5081
      @bonton5081 2 года назад +2

      try to write :
      name! : String;
      username! : String;
      password! : String;

    • @thelearningmighty
      @thelearningmighty  2 года назад

      you can also try like this ....
      custid: number;
      custname: number;
      custusername: string;
      custpassword: string;
      custphone: number;
      custemail: string;
      custaddress: string;
      this syntax for angular 8 and Google it for other version . Very simple you can understand easily. I any issues means please let me know.

  • @diegocolonia8396
    @diegocolonia8396 2 года назад +1

    why dont we need spring security for this ?

    • @thelearningmighty
      @thelearningmighty  2 года назад +2

      If we required means we can added that dependencies. Normally Spring security used for secure authentication for example: Basic Auth, Oauth, jwt auhentication.

  • @karanjitsinghrandhawa445
    @karanjitsinghrandhawa445 2 года назад

    Hello sir
    I have done all but in the end when type user name and password and I submit it then in console it shows
    (Cannot read properties of undefined)
    In both login component.html and .ts file

    • @thelearningmighty
      @thelearningmighty  2 года назад +1

      Okay this is because value for username and password is not taking from login.component.html.. So to fix this check the model name which you jave given in the login html file.

    • @karanjitsinghrandhawa445
      @karanjitsinghrandhawa445 2 года назад +1

      @@thelearningmighty okay sir i am checking and letting you know about it

    • @thelearningmighty
      @thelearningmighty  2 года назад

      @@karanjitsinghrandhawa445 sure

    • @karanjitsinghrandhawa445
      @karanjitsinghrandhawa445 2 года назад +2

      @@thelearningmighty done sir it's working issue solved
      Thank you sir

    • @thelearningmighty
      @thelearningmighty  2 года назад +1

      @@karanjitsinghrandhawa445 please do subscribe dear brother and do share to your friends.

  • @gayankavinda9757
    @gayankavinda9757 Год назад +1

    Sql connection is not working sir

    • @thelearningmighty
      @thelearningmighty  Год назад

      Could you please tell me the error

    • @gayankavinda9757
      @gayankavinda9757 Год назад

      @@thelearningmighty I share my project here
      drive.google.com/file/d/1DjsaNiXGDbA5jjur85AQlUwf-_ZxNSxu/view?usp=sharing

    • @gayankavinda9757
      @gayankavinda9757 Год назад

      I believe I could find a solution to my problem

    • @thelearningmighty
      @thelearningmighty  Год назад

      @@gayankavinda9757 this would take time for me to check the project. Please go ahead with the error name

    • @thelearningmighty
      @thelearningmighty  Год назад

      Happy that error being solved

  • @aashiqmhd2481
    @aashiqmhd2481 2 года назад

    tnx for this, I need to know about how to implement this login validation only using postman

    • @thelearningmighty
      @thelearningmighty  2 года назад +1

      With we can test the requests from backend application

  • @anonsurf23
    @anonsurf23 2 года назад +1

    code link?

    • @thelearningmighty
      @thelearningmighty  2 года назад

      loginUser() {
      var user = this.model.username;
      var password = this.model.password;
      this.userservice.getUserData(user, password)
      .subscribe((res: boolean) => {
      this.getData = res;
      if (this.getData == true) {
      this.router.navigate(["/home"])
      } else {
      alert("Invalid users")
      }
      });
      }

  • @Mkras
    @Mkras Год назад +1

    Sir can you provide source code? Thanks

    • @thelearningmighty
      @thelearningmighty  Год назад +1

      Yes i will share 😊

    • @Mkras
      @Mkras Год назад +1

      @@thelearningmighty thanks...because i have an error : "Consider defining a bean of type 'com.backend.service.UserService' in your configuration"

    • @Mkras
      @Mkras Год назад +1

      @@thelearningmighty when?

    • @thelearningmighty
      @thelearningmighty  Год назад +1

      @@Mkras today
      Just check the description after some time. I will update the link to dpwnload the code.

    • @Mkras
      @Mkras Год назад +1

      @@thelearningmighty thanks

  • @gaganverma5786
    @gaganverma5786 2 года назад

    Can you share this code

  • @ravishanker8736
    @ravishanker8736 2 года назад +1

    Sir pls reply, i have mailed u

    • @thelearningmighty
      @thelearningmighty  2 года назад

      I gave the solution.. Please check your mail Please....

  • @zahidch7932
    @zahidch7932 2 года назад +1

    Secondly in loginUser() I cannot add res:boolean it shows red underline, no quick fix
    var username = this.model.username;
    var password = this.model.password;

    this.userservice.getUserData(username,password)
    .subscribe((res:boolean) => {
    this.getData = res;

    • @thelearningmighty
      @thelearningmighty  2 года назад +1

      First of all , Thank you for being patient. Here is the code just replace the customerService as UserService as per your code.
      loginUser()
      {
      var user=this.model.name;
      var password=this.model.password;
      console.log(this.model);
      this.customerService.getUserData(user,password).subscribe(
      (res:number) =>{
      this.getData=res;
      console.log("flag "+this.getData)
      if(this.getData != -1)
      {
      this.router.navigate(['/home']);
      }
      }
      );

      }

    • @geetanjalidhoke5736
      @geetanjalidhoke5736 2 года назад

      @@thelearningmighty Still it is not getting solved. It is showing error at res:number ?

    • @thelearningmighty
      @thelearningmighty  2 года назад

      @@geetanjalidhoke5736 In the video we are using Angular 8. could you please check which version you are using ? Also please share your code and error screenshot to this mail id quickproject131@gmail.com

    • @geetanjalidhoke5736
      @geetanjalidhoke5736 2 года назад

      @@thelearningmighty I have sent you a mail about this

    • @geetanjalidhoke5736
      @geetanjalidhoke5736 2 года назад

      @@thelearningmighty i have following versions
      Angular CLI: 14.2.3
      Node: 18.12.1 (Unsupported)
      Package Manager: npm 8.19.2