code: async def authorize(self) -> None:
          
          html = await self._get_auth_page()
          url = URL('/authorize?email')
          for step in range(self.num_of_attempts):
              if url.path == '/authorize' and 'email' in url.query:
                  # Invalid login or password  and 'email' in q.query
                  url, html = await self._process_auth_form(html)
              if url.path == '/login' and url.query.get('act', '') == 'authcheck':
                  # Entering 2auth code
                  url, html = await self._process_2auth_form(html)
              if url.path == '/login' and url.query.get('act', '') == 'authcheck_code':
                  # Need captcha
                  url, html = await self._process_auth_form(html)
              if url.path == '/authorize' and '__q_hash' in url.query:
                  # Give rights for app
                  url, html = await self._process_access_form(html)
              if url.path == '/blank.html':
                  # Success
                  self.access_token = url.query['access_token']
                  return
          raise VkAuthError('Something went wrong', 'Exceeded the number of attempts to log in')
docs: Getting a new token from server