What can be the problem with my await syntax?

As you can see in the code below, first i am asking the user to turn on the location then i get the geolocation of the user. I am using a 15 sec timeout, so if i can’t get the coordinates of the user, i am using a default location.
However this 15 sec timeout is already running while the location permission request window is active. How could i only run the geolocation code when the user select yes or no on the location permission alert?

async locationReq(){
    this.locationAccuracy.canRequest().then((canRequest: boolean) => {
      
        if(canRequest) {
          this.locationAccuracy.request(this.locationAccuracy.REQUEST_PRIORITY_HIGH_ACCURACY).then(
            () => console.log('Request successful'),
            error => console.log('Error requesting location permissions', error)
          );
        }
      
      });
      return await this.plt.ready().then(() => {
        let loader = this.loadingCtrl.create({content: "Helyadatok lekérdezése..."});
        loader.present();
        var options = {
          timeout: 15000
        };
  
        this.geolocation.getCurrentPosition(options).then(resp => {
          this.lat = resp.coords.latitude;
          this.lang = resp.coords.longitude;
          loader.dismiss();
          this.mapLoadingPresent();
        }).catch(() => {
          console.log("sikertelen location");
          this.lat = 47.49801;
          this.lang = 19.03991;
          loader.dismiss();
          this.mapLoadingPresent();
          this.presentToast();
        });
  
      });
  }

I just checked my app, what I do, is setting the timeout “outside” the getLocation aka I get the current location without timeout but I set a timeout to the call.

Not sure if actually that solve the problem or if I’m facing exactly the same problem as you do…but maybe that would be the solution?

Pseudo code:

getLocation():Promise<{}> {

    return new Promise((resolve, reject) => {

        var options = {};
         this.geolocation.getCurrentPosition(options).then(resp => {
              resolve(resp);
         }).catch((err) => {
              reject(err);
        });
   });
}

yourCallingMethod() {
      let findLocation = Observable.fromPromise(this.getLocation());
    
      findLocation
                .pipe(
                    timeout(15000)
                )
                .subscribe((location) => {
                      console.log(location);
                }, (err) => {
                      console.log(err);
                });
  }