@classmethod
  def GetAccessTokenSettings(cls, identity_type, use_short_token):
    if identity_type == 'Phone' or use_short_token:
      # 4-digit token, expire token after an hour.
      return (4, constants.SECONDS_PER_HOUR)
    elif identity_type == 'Email':
      # 9-digit token, expire token after a day.
      return (9, constants.SECONDS_PER_DAY)

    assert False, 'unsupported identity type "%s"' % identity_type
Returns settings that control how the access token for various identity types behaves.
dataset/ETHPy150Open viewfinderco/viewfinder/backend/db/identity.py/Identity.GetAccessTokenSettings