Skip to content
  • Our Product
    • Namazu Elements
      • What is Elements?
      • Why open source?
      • Docs
        • Namazu Elements in Five Minutes or Less
        • RESTful APIs Library
        • Security Model
        • Accessing the Web UI (CMS)

    Our Product

    A logomark with three layered rhombuses adorning the lettermark that says Elements in bold all-caps sans-serif letters.
    • What is Namazu Elements? Discover our easy-to-use backend network solution built for online games. Rapidly enables full-scale multiplayer games or online solo adventures.
    • Why open source? Is there a truly open source server backend for connected games? There is now. Download and run a local copy of Namazu Elements and try it for yourself.
    Download Namazu Elements

    Get started

    • Quick start Read our Elements 5-minute quick start guide
    • Documentation Read our developer docs for learning more about Elements
    • RESTful APIs A full list of core API specs for working with the Elements framework
    • Security An overview of the server-authoritative security model of Elements
    • Accessing the CMS Manage your game with ease via the Namazu Elements CMS.

    Co-development Reimagined

    • Best real-time game backends in 2026 If you're researching an alternative to your current backend solution, we've prepared a report of all of the backend solutions on the market in 2026 and how Namazu Elements compares.
      Co-dev

    Recent Posts

    • The watercolor-styled Namazu Studios logo over a giant namazu lurking in the depth
      Namazu Studios Featured in San Diego Business Journal
      22 Sep 2025 Press
    • Namazu Elements 3.1 Released – Service Layer Fixes, Secure APIs, and Steam Bug Fix
      22 Apr 2025 Release Notes
  • Case Studies
  • About Us
  • News
  • Services
  • Book a call
namazu-studios-logo
Book a call
Popular Search Roblox

Getting Started

  • Namazu Elements in Five Minutes or Less
  • Overview
  • Accessing the Web UI (CMS)
  • CMS Feature Overview

Fundamentals

  • Why You Need a Server (and What “Authoritative” Means)
  • Elements as a Game Runtime
  • Where Your Authoritative Code Runs
  • Lifecycles and Flows

General Concepts

  • Custom Elements
  • Data Models
  • Security Model
  • N-Tier Architecture

Namazu Elements Core Features

  • Email Service
  • Applications
  • Sessions
  • Users and Profiles
  • Digital Goods
  • Progress and Missions
  • Progress and Missions (3.4+)
  • Leaderboards
  • Matchmaking – Comprehensive Guide
  • Friends
  • Followers
  • Product Bundles and SKUs
  • Item Ledger
  • Receipts
  • Reward Issuances
  • Save Data
  • Metadata
  • Metadata (3.4+)
  • Queries
  • User Authentication / Sign In
    • What is a User?
    • Email Verification
    • User Authentication in Elements
    • Account Linking
    • Setting Up Twitch OIDC Login (Backend)
    • OIDC Login for Thick Clients (Browser Redirect Flow)
    • Auth Schemes
      • Auth Schemes
      • OAuth2
      • OIDC
  • Features
    • Web3
      • Wallets
      • Vaults
      • Omni Chain Support
      • Smart Contracts
        • Smart Contracts
  • Queries
    • Advanced Operators
    • Object Graph Navigation
    • Boolean Queries
    • Base Query Syntax
  • Advanced Operators
    • .name
    • .ref

Your Game Code - Adding Custom Elements

  • Custom Code Overview
  • Windows Setup
  • Mac OS Setup
  • Ubuntu Linux Setup
  • Element Anatomy: A Technical Deep Dive
  • Introduction to Guice and Jakarta in Elements
  • Structuring your Element
  • Events
  • Packaging an Element with Maven
  • Deploying an Element
  • Preparing for code generation
  • Properties
  • Websockets
  • RESTful APIs
  • Direct MongoDB Access (3.5+)
  • Building the Example Element: A Complete Walkthrough
  • Building the Kotlin Example Element: A Complete Walkthrough

Configuration

  • Configuring External URLs for Deployment
  • Matchmaking – Comprehensive Guide
  • Direct Database Access and Batch Configuration
  • Connecting Namazu Elements to a TLS-Enabled MongoDB Replica Set
  • Batch Samples
    • Mission Upload Bash Script Sample
    • Item Upload Bash Script Sample

RESTful APIs

  • Importing into Postman
  • RESTful APIs Library
  • Swagger and Swagger UI

Add-Ons

  • Crossplay
    • Crossfire Client Libraries (JVM & Browser)
    • Crossfire Protocol Reference
    • Crossfire: Custom Matchmaking Algorithms
    • Namazu Crossfire (Multiplayer)
    • Deploying Namazu Crossfire in your game
  • Roblox
    • Roblox Overview
    • Secure Player Authentication & Registration
    • Global Matchmaking
    • Roblox Security Best Practices
  • Container on Demand
    • Namazu Conductor
    • Namazu Conductor Admin API
    • Configuring Namazu Conductor Providers
  • Commerce
    • Stripe
      • Stripe
      • Configuring the Stripe Element
      • Stripe REST API Reference
      • Stripe REST API Reference

Game Engine & Client Support

  • Unity
    • Elements Unity Plugin
    • Unity Crossfire Plugin
  • Gamemaker
    • Incorporating GMEXT-Elements into a GameMaker Project

Troubleshooting

  • Common Issues with Docker
  • Local SDK
    • Unable to deploy application : dev.getelements.elements.sdk.exception.SdkElementNotFoundException
    • Could not load class : java.lang.NoClassDefFoundError
  • Namazu Elements Community Edition
    • Common Issues with Docker
    • Unable to deploy application : dev.getelements.elements.sdk.exception.SdkElementNotFoundException
    • Running in the IDE
      • Exception in monitor thread while connecting to server localhost:27017
      • Could not deployAvailableApplications Jetty server Failed to bind to /0.0.0.0:8080 Address already in use

Releases

  • 3.8 Release Notes
  • 3.7 Release Notes
  • 3.6 Release Notes
  • 3.5 Release Notes
  • 3.4 Release Notes
  • 3.3 Release Notes
  • 3.2 Release Notes
  • 3.1 Release Notes
View Categories
  • Home
  • Docs
  • Namazu Elements Core Features
  • User Authentication / Sign In
  • OIDC Login for Thick Clients (Browser Redirect Flow)

OIDC Login for Thick Clients (Browser Redirect Flow)

Est. read time: 2 min read

AI Doc Summarizer Doc Summary
AI Doc Summarizer Thinking Thinking

Elements handles the entire OIDC handshake on the server, so a native client logs a User in with two HTTP calls and one call to open a URL. That works from any engine or language that can POST JSON and launch the system browser: Unity, Unreal, GameMaker, a console build, a command-line tool.

What this gives you. #

One integration covers every provider. The client sends a provider name and gets back a URL. Google, Apple, Twitch, and any provider an administrator registers all use the identical client-side code path.

Providers are a server-side configuration change. Adding Twitch support after ship is an admin API call, not a client rebuild and store resubmission.

Credentials stay on the server. Client secrets, code exchange, and id_token validation all live in Elements. Your game binary carries a provider name and nothing else worth extracting.

Users authenticate in their real browser. Existing provider sessions, password managers, passkeys, and 2FA prompts all work the way the User expects, which usually means the login is a single tap rather than a typed password.

The client needs only outbound HTTP. Elements owns the registered redirect URI and receives the provider’s callback directly, so the client requires no listening socket, no port allocation, and no firewall exception.

Clients that already hold an id_token from a native platform SDK can skip the browser entirely; see the shortcut at the end of this page.

Full Request Sequence #

Endpoint reference #

Three endpoints appear in the flow above, but the client calls only two of them. POST /OIDC/Session starts the attempt and GET /OIDC/Session/{handle} polls it. The callback in between is provider-facing and is documented here so you can recognize it in logs, not because your client will ever invoke it.

1. POST /OIDC/Session, begin the attempt #

Requests, the client must begin the OIDC auth process. Each of the

📋
Request Body
{ "provider": "twitch" }
📋
Response Body – 201 Created
{
  "handle": "opaque-poll-handle",
  "authorizeUrl": "https://id.twitch.tv/OAuth2/authorize?...",
  "expiresAt": 1234567890
}

The client opens authorizeUrl in the system browser and retains handle for polling. expiresAt bounds how long the attempt stays valid; once it passes, the handle stops resolving and the client should start a fresh attempt.

2. Browser completes the provider’s login flow #

This step happens entirely between the User’s browser and the provider. The client Application is not involved and does not receive the redirect. The provider redirects the browser to the server’s registered callback:

GET /OIDC/{provider}/callback?code=...&state=...

This endpoint is provider-facing only, is never called by the game client, and always returns a 200 HTML page regardless of outcome. The actual result is observable only via the poll endpoint, which keeps the outcome on an authenticated channel the client controls.

3. GET /OIDC/Session/{handle}, poll for completion #

Response, one of:

statusMeaning
PENDINGStill waiting on the User; poll again after a short delay.
COMPLETEReturned exactly once, on the poll that first observes completion. Includes Session, the completed Elements Session.
FAILEDLogin failed or was denied. Includes a human-readable reason.
404The handle is unknown, already consumed, or has expired.

Because COMPLETE is returned exactly once, the Session is delivered to a single caller and cannot be picked up by a replayed poll. Store the returned Session on receipt; a second poll against the same handle will 404.

Once COMPLETE is observed, the client has its Elements Session and the flow is done.

Shortcut: client already holds an id_token #

If the client already has a valid id_token from a native provider SDK, such as a platform Sign-In SDK, it can skip the browser and poll steps entirely:

📄
{ "provider": "twitch", "idToken": "<id_token>" }

POST /OIDC/Session with idToken set returns 200 synchronously with the completed Session, sharing the same token-validation logic as the callback path:

📄
filename.js
{ "Session": { "...": "..." } }

What are your Feelings
Still stuck? How can we help?

How can we help?

Updated on August 13, 2026
Setting Up Twitch OIDC Login (Backend)What is a User?
Table of Contents
  • What this gives you.
  • Full Request Sequence
  • Endpoint reference
    • 1. POST /oidc/session, begin the attempt
    • 2. Browser completes the provider's login flow
    • 3. GET /oidc/session/{handle}, poll for completion
      • Shortcut: client already holds an id_token
  • Documentation
  • Terms of Service
  • Privacy Policy
  • Contact us
  • Linkedin
  • Join our Discord

Namazu Studios LLC is powered by Namazu Elements, an open source modular backend framework for connected games.

Namazu Elements
  • Download
  • About Elements
  • Open source
  • Documentation
  • Support
Namazu Studios
  • Case Studies
  • About Us
  • News
Best realtime game backends 2026
Get in Touch
  • info@namazustudios.com
  • Book a call
  • (619) 862-2890
  • Linkedin
  • Discord

©2008-2026 Namazu Studios. All Rights Reserved.