2

So, I apologize in advance as I'm only now getting familiar with all the Oauth2 terminology.

I have an existing Drupal 7 site with its own active user base. The organization I support has recently partnered with another organization, and I need to provide access to the new organization's users to the Drupal 7 site. So, I need to implement two specific functionalities:

  1. A "login with Partner Org" credentials option on the login page;
  2. On a re-direct from the partner organization, check if the user is logged in and authenticate them automatically if so.

The partner organization has provided me with an Oauth2 Client ID and Secret; and the re-direct URL is set for the Drupal 7's members home page. I feel like I should mention that the D7 site currently doesn't run HTTPS.

So, how does one go about implementing the following functionality? I've looked around, and it's not really clear to me if this is something that I can implement with a contributed module, or if this is something that I have to do with a custom module?

UPDATE: I'm aware of the OpenID modules as well as Oauth2 client and Authentication. I haven't seen an example or tutorial that gives a good overview of the pieces necessary and how to implement the functionality on D7. Would be open to any overview focused on a generic 3rd party IDP will the modules or steps necessary to implement, particularly addressing user and session management.

  • In Drupal 8 there is External Auth module, or you can just implement your own UserAuth service and override the default. For Drupal 7, I think a function you're looking for is user_login_external or something of that nature. – Kevin Jan 22 '18 at 19:12
  • 2
    For good measure yes you should want to implement HTTPS too. – Kevin Jan 22 '18 at 19:13
  • Really good question +1 although I think it might be a little too broad to get a decent answer from here. – leymannx Jan 22 '18 at 19:58
  • I'm very open to narrowing it down if you have a suggestion on breaking the question up. I wanted to present my use case in the hope that someone has had to solve something like this before. – nizz0k Jan 22 '18 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.