Skip to content

[Feature]: Support Separate OIDC Client IDs for Web and Native Mobile Apps #335

Open

Description

@philippst

Problem Statement

When using Wardrowbe with AWS Cognito as an OIDC provider, authentication works correctly in the web application but fails in the native iOS app.

The web application uses an OIDC client configured with a client secret (OIDC_CLIENT_ID and OIDC_CLIENT_SECRET). However, native mobile applications should use a public OAuth client without a client secret, typically using the Authorization Code Flow with PKCE.

Current behavior:

  1. The native iOS app initiates authentication through the system browser.
  2. AWS Cognito successfully authenticates the user.
  3. The browser redirects back to the native Wardrowbe app.
  4. The token exchange fails with the following error:
{
  "error": "invalid_client",
  "error_description": "invalid_client_secret"
}

The app displays Token exchange failed (400).

This suggests that the native app may be attempting to exchange the authorization code using the same OIDC client configuration as the web application, which requires a client secret.

Currently, Wardrowbe only documents a single OIDC client configuration, making it difficult to support both confidential web clients and public mobile clients.

Proposed Solution

Add support for separate OIDC client IDs for web and native mobile applications, while continuing to use the same OIDC issuer and user pool.

For example, extend the existing environment configuration:

# Shared OIDC provider
OIDC_ISSUER_URL=...

# Native mobile application (public client)
OIDC_MOBILE_CLIENT_ID=...

Alternatives Considered

No response

Feature Area

Mobile/PWA

How important is this feature to you?

Nice to have

Additional Context

Environment:

  • Application: Wardrowbe (self-hosted)
  • Identity Provider: AWS Cognito
  • Authentication Protocol: OpenID Connect (OIDC)
  • Web authentication: Working correctly
  • Native iOS authentication: Fails during token exchange
  • Error: invalid_client_secret (HTTP 400)

The error occurs after successful authentication in the system browser and after returning to the native iOS application.

No corresponding errors were observed in the Wardrowbe frontend logs, suggesting that the token exchange may be handled directly by the native app.

Contribution

  • I would be willing to help implement this feature

Activity

  1. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor

    Thanks for opening your first issue in Wardrowbe! Please make sure you've checked the CONTRIBUTING guide and the deployment docs. A maintainer will take a look soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions