There are several methods of authenticating and establishing a session with the Spark API. The appropriate method depends on how the developer's API key is configured and the needs of the application:
- OpenID + OAuth 2 Hybrid Protocol. This is the preferred approach. It combines the features of both OpenID (identification) and OAuth 2 (authorization) together in one request. The advantage to using the hybrid protocol is in the user experience. Acquiring identity information and access to the API only requires a single "allow" click from the user.
- OpenID is strictly authentication and user identification. This allows an application to receive a name, email address, and a few other simple identifying attributes on an agent or consumer. It does not provide access to data. The use case for OpenID is to allow users to sign in to your application without needing to create and store account information. The Spark Platform handles accounts for you, and results in a smoother end user experience.
- Spark API authentication. This is used when writing IDX products that act on behalf of a single user explicitly defined for that key.