OAuthData ProcessLogin method

Hello community,

I have a somes questions about this method, I know this method is called when the user is redirected to Telligent Evolution after logging in through the OAuth service. I also know that should return information provided by the service or return null. Now:

  1. what happens internally when you return null?
  2. What is going to see the end user if we return null? 
  3. If we return null, because a validation or a failed login or whatever, is there anything else we need to add in the login widget?

Thanks in advance!

  • You shouldn't be passing back null from this method on purpose.  If its being called, external login was successful and as such the OAuthData object should be populated accordingly.

    Otherwise it gets treated as an error and the system reacts like there was an error which means there was a problem, it should not be used for validation which really, there is nothing to validate at this point.

  • Hi Patrick,

    I totally agree, but what happens if the external login wasn't successful and the OauthData can't be populated. Is it ok to return null on that case. so the system can react accordingly? Or what should I do?

  • If the external auth fails, this method is not invoked.  

  • What happens to me in this case is the following:

    • Once the external login is invoked, there are times where the users could be locked, so the service is not going to return the OAuthData needed, we only get the error message.
    • Since we don't have OAuthData available, I saw that by returning null, Telligent reacts redirecting to a Login Failed page, with the 111 code. That works just fine for me, since we could just adjust the message accordingly.

    Based on that, I wanted to know if because of returning null, is the expected scenario or we just getting that result by coincidence or somethig.

  • This does not seem to be following a standard Oauth flow.  Process login only gets invoked by the redirect url, which in turn should only be invoked when things on the external side are successful.  You can return null yes, it will result in an exception on the platform but the user will more than likely not know what happened.  At that point it isn't a login failure, its an actual exception because things didn't work as expected.

  • Alright, understood. Thanks for your time!