Skip to main content

Overview

LoginRadius Session APIs provide visibility into user session activity, enabling administrators to monitor and manage login behavior across different devices and locations. These APIs are designed for server-side use and support advanced use cases like session auditing, concurrent session control, and device-level logout.

⚠️ Session APIs return sensitive access token information. Always implement them securely and use them with caution to ensure security.

API Security

LoginRadius Session APIs rely on the LoginRadius API Secret, which holds high-level access permissions. It's crucial that this key remains confidential and is never included in any client-side code.

How to Retrieve Your API Secret:

Key Features and Use Cases

Session Insights

  • Retrieve all active sessions for a user across devices and locations.
  • Access metadata like IP address, browser, OS, and login timestamp.

Session Management

  • Detect concurrent logins and enforce single-session policies.
  • Invalidate individual sessions by revoking access tokens.

These APIs are commonly used for:

  • Detecting unauthorized or abnormal login behavior.
  • Enforcing device/session limits for added security.
  • Supporting user-level session visibility in admin dashboards.
  • Logging users out from untrusted devices.

Common Session API Endpoints

These endpoints support use cases like validating active sessions, revoking access, enforcing login policies, and monitoring session metadata. For better clarity, the endpoints are grouped by functionality below.

Manage access tokens and secure one-time tokens (SOTT) for login and registration flows.

EndpointDescription
Generate SOTTThis API allows you to generate SOTT with a given expiration time.
Access TokenThis API translates the Request Token generated from a successful OAuth from the social platform into an Access Token that can be used with other API calls.
Validate Access TokenThis API validates access_token; if valid, it returns a response with its expiry, otherwise an error.
Invalidate Access TokenThis API invalidates the active access token or expires the access token's validity.

Best Practices

  • Session APIs should be called from secure server-side environments.
  • Log all access token invalidations for audit purposes.
  • Regularly review session activity to detect anomalies.
  • Never expose access tokens or API secrets in frontend applications.