OAuth 2.0 provider setup enables "Login with Google/GitHub/VK" in your app. For web: Authorization Code flow. For SPA/mobile: Authorization Code + PKCE (RFC 7636). Process: register OAuth app at provider, get client_id + client_secret, redirect URI setup, exchange code for access_token, fetch user profile.
Below: step-by-step, working examples, common pitfalls, FAQ.
https://example.com/oauth/callbackhttps://provider.com/oauth/authorize?client_id=X&redirect_uri=...&scope=email&state=RANDOMcode for access_token at provider token endpointGET https://provider.com/api/user| Scenario | Config |
|---|---|
| Google OAuth — authorize URL | https://accounts.google.com/o/oauth2/v2/auth?client_id=CLIENT_ID&redirect_uri=REDIRECT&scope=openid email profile&response_type=code&state=RANDOM |
| GitHub token exchange | POST https://github.com/login/oauth/access_token\n client_id=X&client_secret=Y&code=Z&redirect_uri=REDIRECT |
| PKCE for SPA | code_verifier = base64url(random(32))
code_challenge = base64url(sha256(code_verifier))
# authorize URL + code_challenge + code_challenge_method=S256 |
| PHP pseudo-code (Authlib) | $client = new GoogleClient($clientId, $secret);
$url = $client->getAuthUrl($redirectUri);
$token = $client->exchangeCode($_GET['code']);
$user = $client->getUser($token); |
| State validation | session_start();
$_SESSION['oauth_state'] = bin2hex(random_bytes(16));
# in callback: hash_equals($_SESSION['oauth_state'], $_GET['state']) |
The tool checks HTTP security headers, SSL/TLS configuration, server info leaks, and protection against common attacks (XSS, clickjacking, MIME sniffing). A grade fromA to F shows overall security level.
Checking Content-Security-Policy, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, and more.
TLS version, certificate expiry, chain of trust, HSTS support.
Finding exposed server versions, debug modes, open configs, and directories.
Detailed report explaining each issue with specific steps to fix it.
HTTP header audit
config verification
CSP & HSTS setup
compliance checks
Strict-Transport-Security.Server: Apache/2.4.52 helps attackers find exploits. Hide the version.DENY or SAMEORIGIN.nosniff, browsers may misinterpret file types (MIME sniffing).Content-Security-Policy-Report-Only, monitor violations, then enforce.Server, X-Powered-By, X-AspNet-Version from responses.Security check history and HTTP security header monitoring.
Sign up freeOAuth 2.0 — authorization only. OpenID Connect — identity layer atop OAuth, returns an <code>id_token</code> (JWT) with user claims.
No, deprecated since 2019. Always Authorization Code + PKCE for SPA/mobile.
Server-side (session/database). Never in localStorage/JS-accessible cookies. Only httpOnly cookie or server storage.
postmaster.google.com → OAuth 2.0 Playground. Or <a href="/en/jwt">Enterno JWT decoder</a> to inspect the access_token.