code: def authorize(*args, **kwargs):
      
      if request.method == 'GET':
          client = Client.query.filter_by(
              client_id=kwargs.get('client_id')
          ).first()
  
          if not client:
              abort(404)
  
          scopes = current_oauth2server.scopes
          ctx = dict(
              client=client,
              oauth_request=kwargs.get('request'),
              scopes=[scopes[x] for x in kwargs.get('scopes', [])],
          )
          return render_template('invenio_oauth2server/authorize.html', **ctx)
  
      confirm = request.form.get('confirm', 'no')
      return confirm == 'yes'
docs: View for rendering authorization request.