Hi,
I am using Janrain to allow our users to log in using their GoogleApps accounts hosted on our domain.
Is there anyway to ONLY allow GoogleApps accounts hosted on our domain to use Janrain and not just any old Google Mail accounts?
Would be great to be able to edit the Google image used in the service providers window too.
Regards,
Reg.
Comments
Comment #1
geokat commentedOne way to achieve this is by checking the user's email returned by Google in the token handler function and not proceeding with the login unless the email belongs to your organization.
Comment #2
drupalreggie commentedHi,
Thanks for the suggestion though I'm not entirely sure about how to go about implementing it. Would this be with rules or some PHP scripting?
Sorry - I'm still very much a learner Drupaler...
Cheers,
Reg.
Comment #3
drupalreggie commentedHi Geokat,
I'd really like to stop users registering with a standard googlemail account as we've had another one do it today. How exactly can I implement the changes you suggested?
Thanks,
Reg.
Comment #4
drupalreggie commentedCan anyone expand on this? It would be REALLY useful for me! Its even more frustrating knowing there is a solution but that I don't know how to implement it...
Cheers,
Reg.
Comment #5
geokat commentedrpx_core.pages.inc has a function called token handler (or something like this).
That's where the user profile data is pulled from Engage, along with the email address, and new users are registered.
You could add a check there.
Comment #6
geokat commentedAnd yes, this is PHP scripting.
Comment #7
drupalreggie commentedThanks again. Would I implement the check somewhere in this chunk of code taken from rpx.admin.inc? I'm presuming I need to specify my domain name somewhere...?
/**
* RPX Module settings form
*/
function rpx_admin_settings_form() {
$api_key = variable_get('rpx_apikey', FALSE);
if (!$api_key && !isset($_GET['token'])) {
global $user, $base_url;
$request_id = $_SESSION['rpx_request_id'] = md5($user->mail . time());
$text = '
Before using RPX with this site you must setup an account at rpxnow.com. Visiting the following link will allow you to setup your RPX account and will return the required api key: Setup this site for RPX
';
$form['setup'] = array('#value' => t($text, array(
'!create_rp' => RPX::create_api .'?'. http_build_query(array(
'base' => $base_url . base_path(),
'return' => url('admin/settings/rpx', array('absolute' => TRUE)),
'requestId' => $request_id
))
)));
}