Skip to content

Instantly share code, notes, and snippets.

@Geczy
Created December 4, 2012 22:16
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Geczy/4209441 to your computer and use it in GitHub Desktop.
Save Geczy/4209441 to your computer and use it in GitHub Desktop.
SSO Login for Freshdesk support portal - PHP Sample Code
function freshdesk_login_url($name, $email) {
$secret = '____Place your Single Sign On Shared Secret here_____';
$base = 'http://mycompany.freshdesk.me/';
return $base . "login/sso/?name=" . urlencode($name) . "&email=" . urlencode($email) . "&hash=" . hash('md5', $name . $email . $secret);
}
header("Location: " . freshdesk_login_url("John Doe", "username@thecompany.com") );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment