1. Developers»
  2. Installing Clickpass»
  3. Register new signups

Register new signups

URLs required on your site

Creating new accounts using Clickpass

Clickpass allows you to call a user's registration information from an API so that they don't have any forms to fill.

You can immediately access information such as their email address, profile photo and name without them having to type anything.

Clickpass also provides a branded, A/B-tested user interface to get the user through registration as fast as possible.

process_openid_registration

http://yoursite.com/<OpenID directory>/process_openid_registration/

Description

To receive and validate the registration information for a user

  1. Receive registration information via GET request
  2. Validate registration details
  3. If invalid, redirect to Clickpass with errors (rinse and repeat)
  4. When data validates successfully, create a new account for user and send them to their account page

No validation of the OpenID is required at or after registration.

The user will have already successfully authenticated their OpenID URL and the results of that authentication should have been saved in your session by the time they arrive at registration.

Parameters your URL should accept

Submission method: GET

Parameter Description
nickname Value of requested parameter
family-name Value of requested parameter
given-name Value of requested parameter
email Value of requested parameter
photo-url Value of requested parameter - Url where you can find the users photo
privacy_policy_validated Whether the user agreed to your Privacy Policy
tos_validated Whether the user agreed to your Terms of Service
Return behaviour
EITHER, if form doesn't validate:

Redirect to: clickpassBeginRegistration_url (with errors)

OR, if form does validate:

Create a new account and log the user into it.

Parameters to append to return URL:

see details at Clickpass registration form

Pseudo code example
http://yoursite.com/<OpenID directory>/process_openid_registration/ // setup parameters clickpassBeginRegistration_url = 'http://clickpass.com/signup/' registrationParameters = <your required registration parameters /> authenticatedOpenID = SESSION.authenticatedOpenID accountHomepage_url = 'http://yoursite.com/account/home/' userRegistrationParameters = GET // check this is a valid registration attempt if ( NOT authenticatedOpenID ) redirect_to( invalid_attempt_url ) EXIT end_if // pull registration details from request, validate and structure errors error_array = validateRegistrationParameters( userRegistrationParameters ) // redirect to Clickpass with errors or confirmation of success if ( error_array ) clickpassBeginRegistration_url.queryString = urlEncode( registrationParameters ) clickpassBeginRegistration_url.queryString = addParametersAsArray( error_array ) redirect_to( clickpassBeginRegistration_url ) else // registration is valid: create a new account create_new_user_account( userRegistrationParameters, authenticatedOpenID ) // redirect the user to their new account redirect_to( accountHomepage_url ) end_if EXIT
Legend:
local function

Notes on profile photos

The user's profile photo is provided to you in the form of a URL. You may hot-link directly to the Clickpass URL but you are strongly advised to make a local copy. Users are able to delete their photos from the Clickpass server and hot-linked images will break when this happens.

User contributed notes

Have something to add to the docs or a question you want to ask? Get stuck in.

(We may occasionally prune notes to keep them as useful as possible to our readers)