title: In flask-stormpath, how do I route a user to a specific page after loging in based on the user's Stormpath group
body: <p><strong>PROBLEM STATEMENT</strong></p>
  
  <p>I'm working on a flask app that uses Stormpath for authentication. In my app I have two user groups: <code>normal users</code> and <code>admins</code>. After a user logs in, I'd like to redirect them to a specific page based on the group they belong to. So if a user is a normal user they'd be redirected to <code>/dashboard</code> and if they are an admin, they'd be redirected to <code>/admin_dashboard</code>. As of right now, I have <code>STORMPATH_REDIRECT_URL = '/dashboard'</code> so every time they log in they get redirected to <code>/dashboard</code> regardless of the group they belong to. <strong>How can I redirect them to a specific page based on their Stormpath group?</strong></p>
  
  <p><strong>CURRENT CODE SNIPPETS:</strong></p>
  
  <p>Note: I am using the default Flask-Stormpath login views and the app allows social login through Google.</p>
  
  <p><code>/app/__init__.py:</code></p>
  
  <pre><code>def create_app(config_name):
    ...
    # App config here
    ...
    stormpath_manager = StormpathManager()
    stormpath_manager.init_app(app)
    ...
    return app
  </code></pre>
  
  <p><code>/config.py:</code></p>
  
  <pre><code>class Config(Object):
    ...
    STORMPATH_REDIRECT_URL = '/dashboard'
    ...
  </code></pre>
  
  <p><code>/app/dashboard/views.py:</code></p>
  
  <pre><code>@dashboard_blueprint.route('/dashboard')
  @login_required
  @groups_required(['normal-users'])
  def dashboard():
    return render_template('dashboard/index.html', title="Dashboard")
  
  @dashboard_blueprint.route('/admin_dashboard')
  @login_required
  @groups_required(['admins'])
  def admin_dashboard():
    return render_template('dashboard/admin_index.html', title="Admin Dashboard")
  </code></pre>