Blog | G5 Cyber Security

Verify Mobile App with OpenID Connect

TL;DR

Yes, your backend can verify a mobile client using OpenID Connect (OIDC). This guide explains how to do it securely. We’ll focus on checking the ID Token and ensuring proper configuration.

Steps

  1. Understand the Flow
  • Configure Your OIDC Provider
  • Backend Verification: Check the Signature
  • Your backend needs to verify that the ID Token is genuinely from your OIDC provider and hasn’t been tampered with.

  • Secure Storage of User Information
  • Once verified, store the sub claim securely in your backend to identify the user. Do not store sensitive information directly in the ID Token.

  • Consider PKCE (Proof Key for Code Exchange)
  • For native mobile apps, always use PKCE to prevent authorization code interception attacks. Your OIDC provider should support this.

    Exit mobile version