title: How to extract arguments from url that are separated with # in Scala Play
body: <p>I'm implementing the offline Google OAuth flow in Scala Play.</p>
  
  <p>The user clicks on the dialogue "yes I want this application to access the following data of my Google account...". After the user has clicked Ok, the Google server sends a token to my server.
  A sample response looks like this (URL of my browser window):</p>
  
  <blockquote>
    <p><a href="https://myapp.herokuapp.com/storeauthcode#code=123&amp;login_hint=abc&amp;client_id[crypticId].apps.googleusercontent.com&amp;prompt=consent" rel="nofollow">https://myapp.herokuapp.com/storeauthcode#code=123&amp;login_hint=abc&amp;client_id[crypticId].apps.googleusercontent.com&amp;prompt=consent</a></p>
  </blockquote>
  
  <p>How do I extract the the 123 substring (which is my access token) from the current url in the current browser window?:</p>
  
  <pre><code>def storeAuthCode = Action { request =&gt;
  
      //save token
      //confirm login of user now
    }
  </code></pre>
  
  <p>Extracting data like query params does of course not work.</p>
  
  <pre><code>request.path
  </code></pre>
  
  <p>returns</p>
  
  <pre><code>/storeauthcode
  </code></pre>
  
  <p>but not the String with the token.</p>