Cookie-based SSO is a simpler alternative to the OAuth 2.0 flow. When a user is logged in via Frisbii Media, a plenigo_user cookie is set in the browser. Your server reads this cookie and validates it against the Frisbii Media API to confirm the session and retrieve the user profile.
OAuth 2.0 is the recommended approach for new integrations. Cookie-based SSO is suitable for legacy setups or cases where the simpler one-step validation is sufficient and refresh tokens are not needed.
How it works
The user logs in via the Frisbii Media JavaScript SDK (
plenigo.SSO().login())Frisbii Media sets a
plenigo_usercookie in the browserOn subsequent page loads, your server reads the
plenigo_usercookie from the requestYour server sends the cookie value to the Frisbii Media API for validation
A
200response confirms the user is logged in and returns the user profile; a403means the user is not logged in
Validating the cookie server-side
Send the cookie value to:
GET https://api.frisbii-media.com/api/v2/user/profile/byCookie
Header: plenigo_user: {cookie_value}
Or use the named API operation:
GET https://api.frisbii-media.com/#!/user/getUserProfileBySessionCookie
Responses:
HTTP Status | Meaning |
|---|---|
| User is logged in. Response body contains the user profile. |
| User is not logged in or cookie has expired. |
Reading the cookie in PHP
$cookieValue = $_COOKIE['plenigo_user'] ?? null;
if ($cookieValue) {
$response = $client->request('GET',
'https://api.frisbii-media.com/api/v2/user/profile/byCookie',
['headers' => ['plenigo_user' => $cookieValue]]
);
if ($response->getStatusCode() === 200) {
$userProfile = json_decode($response->getBody()->getContents());
// User is logged in — $userProfile->customerId, ->email, etc.
} else {
// Not logged in
}
} else {
// No cookie present — user not logged in
}
Limitations compared to OAuth 2.0
Cookie-based | OAuth 2.0 | |
|---|---|---|
Session refresh | No — cookie expires, user must re-login | Yes — refresh token allows silent renewal |
Cross-domain support | Limited by browser cookie scope | Full — token passed explicitly |
CSRF protection | Not built in | Built in via |
Long-lived background sessions | No | Yes |