Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4625606
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:17:50+00:00 2026-05-22T03:17:50+00:00

Does anyone know of a maintained gem that handles user authentication for the Zendesk

  • 0

Does anyone know of a maintained gem that handles user authentication for the Zendesk API through an existing Rails 3 application?

I asked Zendesk IT and got sent to https://github.com/tobias/zendesk_remote_auth, but it does not look rails 3 compatible and has not been updated since 2009.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T03:17:51+00:00Added an answer on May 22, 2026 at 3:17 am

    I think the article in our docs gives the impression that Zendesk SSO is difficult when in fact it is pretty easy (http://www.zendesk.com/api/remote-authentication).

    # reference http://www.zendesk.com/api/remote-authentication
    # you need to be a Zendesk account admin to enable remote auth (if you have not already)
    # go to Settings > Security, click "Enabled" next to Single Sign-On
    
    # three important things to pay attention to:
    # Remote Login URL, Remote Logout URL, and shared secret token
    
    # for testing on a Rails 3 application running on localhost, fill in the Remote Login URL to map
    # to http://localhost:3000/zendesk/login (we will need to make sure routes for that exist)
    
    # fill in Remote Logout URL to http://localhost:3000/zendesk/logout
    
    # copy the secret token, you'll need it later
    
    
    # first, let's create those routes in config/routes.rb
    namespace :zendesk do
      match "/login" => "zendesk#login"    # will match /zendesk/login
      match "/logout" => "zendesk#logout"  # will match /zendesk/logout
    end
    
    # Above I've mapped those requests to a controller named "zendesk" but it can be named anything
    
    # next we want to add our secret token to the application, I added this in an initializer
    # config/initializers/zendesk_auth.rb
    ZENDESK_REMOTE_AUTH_TOKEN = "< your token >"
    ZENDESK_REMOTE_AUTH_URL   = "http://yourcompany.zendesk.com/access/remote/"
    
    # Assuming we have a controller called zendesk, in zendesk_controller.rb
    
    require "digest/md5"
    class ZendeskController < ApplicationController
    
      def index
        @zendesk_remote_auth_url = ZENDESK_REMOTE_AUTH_URL
      end
    
      def login
        timestamp = params[:timestamp] || Time.now.utc.to_i
        # hard coded for example purposes
        # really you would want to do something like current_user.name and current_user.email
        # and you'd probably want this in a helper to hide all this implementation from the controller
        string = "First Last" + "first.last@gmail.com" + ZENDESK_REMOTE_AUTH_TOKEN + timestamp.to_s
        hash = Digest::MD5.hexdigest(string)
        @zendesk_remote_auth_url = "http://yourcompany.zendesk.com/access/remote/?name=First%20Last&email=first.last@gmail.com&timestamp=#{timestamp}&hash=#{hash}"
        redirect_to @zendesk_remote_auth_url
      end
    
      def logout
        flash[:notice] = params[:message]
      end
    end
    
    # Note that the above index action defines an instance variable @zendesk_remote_auth_url
    # in my example I simple put a link on the corresponding view that hits ZENDESK_REMOTE_AUTH_URL, doing so
    # will cause Zendesk to hit your applications Remote Login URL (you defined in your Zendesk SSO settings) and pass a timestamp back in the URL parameters
    # BUT, it is entirely possible to avoid this extra step if you just want to go to /zendesk/login in your app
    # notice I am either using a params[:timestamp] if one exists or creating a new timestamp with Time.now
    

    This example is quite simplistic but I just want to illustrate the basic mechanics of Zendesk SSO. Note that I’m not touching the more complicated issue of creating new users or editing existing ones, just logging in users who have an existing Zendesk account.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know of a good Rails 3 compatible gem or plugin that support
Does anyone know of any existing packages or libraries that can be used to
Does anyone know of a good Command Prompt replacement? I've tried bash/Cygwin, but that
Does anyone know a good Java lib that will hook into SVN so I
Does anyone know of a Reflector add-in that allows you to distribute assembly lists?
Does anyone know of an algorithm for computing how much you 'trust' another user
Does anyone know of a free (non-GPL), decently performing compression library that supports packet
Does anyone know how to maintain text formatting when using XPath to extract data?
does anyone know how you edit/maintain regions in magento - specifically adding ones for
Does anyone know how to get IntelliSense to work reliably when working in C/C++

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.