title: How do I get a user to sign in with Google to access a Deployed GAS Web App?
body: <p>I have a Google App Script Web App. I want to make it compulsory to enter with Google account credentials. I would like each new request to be 'approved' by an admin user by emailing the account request to the admin user then allowing the user access the Web App only after the admin user has approved the request. I also want to reference the session user based on the Google Credentials.   </p>
  
  <p>I went to <a href="https://developers.google.com/identity/sign-in/web/sign-in" rel="nofollow noreferrer">this guide</a> and followed the <code>CONFIGURE PROJECT</code> window, I could not enter the Web App's URL because <code>Invalid Origin: URIs must not contain a path or end with "/".</code> </p>
  
  <p><a href="https://script.google.com/macros/s/AKfycbxsDQyIpFJ4fF6qq1mq-4t7VGxZS7pHYaJwo6h1tKeK0_I/exec" rel="nofollow noreferrer">This</a> is the URL for my web app. </p>
  
  <p>This web app is meant to be used by a maximum of 5 people. </p>
  
  <pre><code>function doGet(){
     //Basic for now: 
     return HtmlService.createHtmlOutputFromFile('mainhtml');
  }
  </code></pre>
  
  <p>How to present the user with a <code>Sign in with Google</code> button then send that request to an admin with <code>GmailApp.sendEmail('admin@email.com', 'Request to join', )</code></p>
  
  <p>Then allow the user to access the site once the admin user has accepted the request. </p>