API Documentation

100% uLogin-compatible OAuth service

Quick Start

Loginly is a drop-in replacement for uLogin. Simply change the domain:

Old (uLogin):

https://ulogin.ru/token.php

New (Loginly):

https://yourdomain.com/token.php

OAuth Flow

Step 1: Redirect User to OAuth Provider

GET /ulogin/auth/{provider}?state={your_api_key}

Providers: google, mailru, yandex, github, vk, facebook, 
twitter, discord, spotify, twitch, gitlab, reddit, 
azuread, telegram, wordpress, okru

Step 2: Handle Callback

User will be redirected back to your redirect_url with a token:

https://yoursite.com/callback?token={jwt_token}

Step 3: Validate Token

GET /token.php?token={jwt_token}

Response:
{
  "network": "google",
  "uid": "user_id",
  "email": "user@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "verified_email": 1,
  "profile": "https://...",
  "photo": "https://..."
}

Integration Examples

JavaScript

// Redirect to OAuth
window.location.href = 'https://yourdomain.com/ulogin/auth/google?state=YOUR_API_KEY';

// After callback, validate token
const response = await fetch(`https://yourdomain.com/token.php?token=${tokenFromUrl}`);
const userData = await response.json();

PHP

<?php
$token = $_GET['token'];
$response = file_get_contents("https://yourdomain.com/token.php?token=" . $token);
$userData = json_decode($response);
?>

Python

import requests

token = request.args.get('token')
response = requests.get(f'https://yourdomain.com/token.php?token={token}')
user_data = response.json()

Features

  • ✅ Full uLogin API compatibility
  • ✅ 17+ OAuth providers supported
  • ✅ Biometric authentication (Passkeys/WebAuthn)
  • ✅ Detailed authentication logs
  • ✅ Real-time analytics dashboard
  • ✅ IP and geolocation tracking
  • ✅ Custom widget styling

Support

For issues and questions, please contact support or check our GitHub repository.