Working in OAuth2 authentication