title: i can't log in through subdomain
body: <p>I am trying to log in a user by sending a POST request to my API where <code>Flask-Login</code> extension doing the authorization process.</p>
  
  <p>The API is on a separated subdomain <strong>api.local.products</strong> , here are the configurations of <strong>/etc/hosts</strong> on my machine also the extension configuration:</p>
  
  <pre><code>192.168.0.108          local.products
  192.168.0.108          .local.products
  192.168.0.108          client.local.products
  192.168.0.108          vendor.local.products
  192.168.0.108          api.local.products
  
  REMEMBER_COOKIE_NAME = 'products.remember'
  REMEMBER_COOKIE_SECURE = None
  REMEMBER_COOKIE_HTTPONLY = True
  REMEMBER_COOKIE_REFRESH_EACH_REQUEST = True
  REMEMBER_COOKIE_DOMAIN = '.local.products'
  
  SESSION_COOKIE_NAME = 'products.store'
  SESSION_TYPE = 'sqlalchemy'
  SESSION_KEY_PREFIX = 'products.store'
  SESSION_COOKIE_DOMAIN = '.local.products'
  
  SESSION_PERMANENT = False
  SESSION_COOKIE_SECURE = True
  SESSION_SQLALCHEMY = SQLALCHEMY_DATABASE_URI
  PERMANENT_SESSION_LIFETIME = timedelta(days=15)
  </code></pre>
  
  <p><strong>api.py</strong></p>
  
  <pre><code>@api_route.route('/user-login', methods=['POST'])
  def user_login():
      data = request.get_json()
  
      login = data['user_login']
      password = data['user_password'].encode('utf-8')
  
      get_user = Users.query.filter(or_(Users.email == login, Users.telephone == login)).first()
  
      if get_user:
  
          if get_user.check_password(password):
  
              if 'remember_me' in data:
                  login_user(get_user, remember=True)
              else:
                  login_user(get_user, remember=False)
  
              identity_changed.send(
                  current_app._get_current_object(),
                  identity=Identity(get_user.id)
              )
  
              return jsonify({'success': create_html_object.generate_html_template(), 'redirect': next_ or url_for('client.index', _external=True)+ f'#{get_user.public_id}' })
          else:
              return jsonify({'error': 'Username or Password is wrong!'})
  
      else:
          return jsonify({'error': 'Error happened!'})
  </code></pre>
  
  <p>The user actually can't login, i can't get the <strong>current_user</strong> object, in fact i am getting a <strong>200</strong> response without any error, also i tried using <code>session['user_logged'] = get_user.public_id</code> and after i get a success message that the user logged in, the value of <strong>user_logged</strong> after redirection is <code>None</code></p>
  
  <p>I forgot to mention that, if i set the API as a path not subdomain, the login process works!</p>