-
Notifications
You must be signed in to change notification settings - Fork 0
CCB Authentication
In order for us to have a centralized, authoritative data repository we want information from our Gravity Forms to go back into CCB.
For this to happen we use the CCB API to authenticate form users to CCB. If they don't have an account, we create one.
How exactly this happens is a bit complicated and I've attempted to flesh it out below.
When an individual is entered into CCB through the normal CCB workflow a user account is not automatically created for them. Instead the individual has a profile unattached to an account.
An administrator of CCB can then log into CCB and create an account for that individual which is associated with the existing profile. However, there is no CCB sanctioned method (without the API) to create an account automatically. Rather one can create a form which requests an account which results in an email to the administrator, the administrator can then login and create the account for you, after which you will receive your credentials.
This is very different from the way most applications work - where an individual can create their own account instantaneously and depends on manual human interaction by an admin of CCB to create the account.
If an individual has a user account with CCB then we can use that account to authenticate them to CCB and quickly gain access to their personal details including groups and family members. Unfortunately, most individuals in my experience do not know their credentials even if they have them.
This is where creating a user account using the API comes into play. Using the API we can create the account without necessitating admin action.
In order to register for an event or group in CCB one must have a profile in CCB.
In order for us to easily retrieve your individual user info (and not anyone else's) we need a way to authenticate that you are you before pulling data from CCB.
CCB Forms are used by CCB to handle things like event registration, but these forms are very limited (no conditional logic, only able to register one individual at a time), thus why this plugin exists in the first place.
Unfortunately, the CCB API allows read access to Forms Services but does not allow us to write to the Forms Services. This is unfortunate because it is using the CCB Forms for its matching logic to check whether an individual already exists in CCB is handled and an option to merge multiple accounts is created. This means that all data entered into CCB needs to be carefully handled as we will be bypassing CCB's built-in methods and inserting directly into various areas (e.g. individuals, groups, events).
We don't want an individual trying to register for an event to feel like they have to jump through hoops to accomplish this, so the creation of a profile and associated user account for individuals without a CCB account needs to be transparent.
That is, when an individual enters registration information, we should create a profile and account for them that is used to associate them to the event, but they don't have to deal with creating a username or password, logging in, etc.