Login with Laravel and Ionic

I am new to Ionic and I need to send the following JSON post to my Backend Laravel application.

{
    "user" : "amk1",
    "pwd" : "schule123"
}

I am new to Ionic and I need to send the following JSON post to my Backend Laravel application.

{
    "user" : "amk1",
    "pwd" : "schule123"
}

I already tested it in Postman and i need to store the following JWT Token.

{"message":"success",
"jwt":"token"}

First of all, how do I send the JSON request from ionic to the Laravel application i did it like this in the login.page.ts.

login(form) {
    this.authService.login(form.value).subscribe((res) => {
      this.router.navigateByUrl('home');
    });
  }

And in the auth.service.ts I wrote this.

export class AuthService {
    AUTH_SERVER_ADDRESS  =  'http://127.0.0.1:8000/checklogin';
    authSubject  =  new  BehaviorSubject(false);
    register: any;
    constructor(private  httpClient: HttpClient, private  storage: Storage) { }
      login(user: User): Observable<AuthResponse> {
        return this.httpClient.post(`${this.AUTH_SERVER_ADDRESS}`, user).pipe(
          tap(async (res: AuthResponse) => {

            if (res.user) {
              await this.storage.set('ACCESS_TOKEN', res.user.access_token);
              await this.storage.set('EXPIRES_IN', res.user.expires_in);
              this.authSubject.next(true);
            }
          })
        );
      }

I get the following error when I try to login.

error:
exception: "ErrorException"
file: "/Users/rotschaedl/DPA/tischreservierenp/app/Http/Controllers/MainController.php"
line: 124
message: "Undefined index: user"
trace: (56) 
__proto__: Object

So what am I missing and how do I store the JWT token for the authentication.

I think you have a error when you capture the body data or you data don’t are recibiring from you laravel app-
share you code where you capture DATA to validate login.

Show me data from the form.value

I don’t see where you are reading from storage, but it is very easy to introduce race conditions when using it to communicate within an app run. To eliminate this risk, I follow this rule:

Only read from storage once, at app startup

If you ever find yourself wanting to break this rule, I would strongly suggest not using storage to do whatever you’re doing.