How to pass next_url of login to authenticate method of my custom OAuthenticator?

I rewrite a custom authenticator based on GenericOauthenticator in order to use different client_id based on the next_url from the login phase.
The login URL is: https://<>/hub/login?next=%2Fhub%2Fuser-redirect%2Fapps%2Fapps%2Fquantum-espresso%2Fqe.ipynb

I want read the parameters of next URL and pass it to authenticate method of my Authenticator class. Is that possible to do this? Thanks for advance if you know how to do this.


authenticate is passed the handler object as the first argument. You can use next_url = handler.get_next_url().