'How to retrieve email address of current user webapp apps script

i've looked up alot to get session email with this do get and failed to achieve it, and i'm unsure how to get it so i will thanks if some one helped me how to solve this issue to retrieve usermail beside each coordinates excuted.

script proprieties script proprieties

Html Code

<html>
  <head>
    <base target="_top">
  </head>
  <body>

    <button id = "find-me">Show my location</button><br/>
    <p id = "status"></p>
    <a id = "map-link" target="_blank"></a>
   
    <script>
      function geoFindMe() {

        const status = document.querySelector('#status');
        const mapLink = document.querySelector('#map-link');
      
        mapLink.href = '';
        mapLink.textContent = '';
      
        function success(position) {
          
          const latitude  = position.coords.latitude;
          const longitude = position.coords.longitude;
         
          google.script.run.saveCoordinates(latitude,longitude);
                         
          status.textContent = '';
          mapLink.href = 'https://www.openstreetmap.org/#map=18/' + `${latitude}\/${longitude}`;
          mapLink.textContent = `Latitude: ${latitude} °, Longitude: ${longitude} °`;
        }

        function error() {
          status.textContent = 'Unable to retrieve your location';
        }

        if(!navigator.geolocation) {
          status.textContent = 'Geolocation is not supported by your browser';
        } else {
          status.textContent = 'Locating…';
          navigator.geolocation.getCurrentPosition(success, error);
        }

      }

         document.querySelector('#find-me').addEventListener('load', geoFindMe);
            window.onload = geoFindMe
       </script>
      </body>
</html>

here's doget function

function doGet(e) {
  return HtmlService.createHtmlOutputFromFile('index');
}
function saveCoordinates(latitude,longitude){
  const sheet = SpreadsheetApp.getActiveSheet();
  const rowContents = [latitude+","+longitude];
  var lastRow = sheet.getLastRow();
var lastColumn = sheet.getLastColumn();
var lastCell = sheet.getRange(lastRow, lastColumn);
  sheet.appendRow(rowContents);
  
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source