OAuth new user's password

I have this scenario:

  • We have an external Identity authentication method working.
  • A user is created using $core_v2_authentication.CreateLoginAndRedirect method, with the overload #2, which creates a new user from an OAuth data token
  • On the options parameter, you can include different things like Email, DisplayName, etc.
  • None of them includes a Password option, but the user is created successfully and can login with a token to the site with no problems.

Now, we are updating the Identity provider which is going to send us a different identity ID, in order to update the identity ID, we have the right Username  that matches the Email ; but, there is one last step when we want to link the account. We're gonna be using the $core_v2_authentication.LinkLoginAndRedirect method, which requires $oAuthDataToken, $userName, $password, rememberUser, $redirectUrl as parameters. We have all of them, except for the $password. As I mentioned above, users created with an OAuth data token never used/have one. What should we do?

We are using Telligent 10.3.4.9982

Regards,

Parents Reply Children
  • Sorry to bother with this but I have an implementation (working one) of the IOAuthClient plugin. I am now trying to replace with the one you suggested, IExternalAuthenticationPlugin and  I'm seeing that the method GetAuthenticatedUserId keeps calling again and again and again. The first time, I can get all of the information coming from the accessing user and if already exists, I can retrieve Telligent's UserID to return. But since its calling again many times, the second time it gets invalidated of course and I'm stuck. Why this should be happening?

  • As an IExternalAuthenticationPlugin, the plugin is responsible for identifying the user on every request, not just when authenticating. It is up to the plugin to persist the authenticated user through future requests. It could use a cookie, for example, or other details on the HTTP request to identify on secondary requests.

  • Hi Ben, it's me again. About this ReturnUrlParameter, let me clarify a little bit what are we using at the External Authenticator so you have a better picture and perhaps give me a suggestion:

    • The external authenticator uses an Authorization Code grant type which is used to exchange an authorization code for an access token.
    • Based on the above, we need to set a redirect_uri with a whitelisted URI where the external authenticator is going to return once the client is authenticated with the Auth0 Code.
    • After the user returns to the client via the redirect URL, the application will get the authorization code from the URL and use it to request an access token.

    So in other words, the external authenticator is not going to return or redirect users  where they were, once authenticated, that should be handle it by us, in the platform. With the IOAuthClient, that was happening via RedirectUrl parameter in the .vm code, but now I don't think there's .vm interaction, so I'm not sure how we should manage this. 

  • IExternalAuthenticationPlugin is not related to OAuth. It defers authentication to URLs that will handle the authentication and provide authentication details to be detected on return. Generally, the URLs provided by the IExternalAuthenticationPlugin are external (not in the Community platform). Users will be taken to this external web site to provide credentials, authenticate, and be returned to Community with a cookie/token/key that can be read within Community (by the IExternalAuthenticationPlugin) to log the user in (potentially creating the user account in the process).

    The URLs provided by the IExternalAuthenticationPlugin should not be OAuth API URLs.