title: Authomatic Flask Oauth2 how to hide provider code from url?
body: <p>I am developing an app the uses Flask and <a href="http://peterhudec.github.io/authomatic/#" rel="nofollow">Authomatic</a> for Oauth2 authentication both with Google and Facebook. It is working just fine, but once in a log in the url on the browser show some state/code hash used on the Oauth2 process. How do I get rid of it? The showcase app from Authomatic does the same thing but quickly somehow hide it from the user.</p>
  
  <p>if I do, the url is clean but I cannot pass any arguments to my endpoint fuction.</p>
  
  <pre><code>full_url = url_for('flaskio.index')
  return redirect(full_url)
  </code></pre>
  
  <p>With this, the url keeps the state argument from Authomatic, but I can pass the arguments I want.</p>
  
  <pre><code>from app.flaskio.routes import index
  return index(currentt_user, socialuser)
  </code></pre>
  
  <p>Endpoint</p>
  
  <pre><code>@socketio.route('/')
  @login_required
  def index(current_userr=None, socialuser=None):
  
      global thread
      if thread is None:
          thread = Thread(target=background_thread)
          thread.start()
          # import pdb
          # pdb.set_trace()
  
      return render_template('socket.html', cescouser=socialuser, current_user=current_userr)
  </code></pre>