Skip to content

chore: map auth build envs to server client IDs in vue example - #413

Merged
arch1995 merged 3 commits into
masterfrom
chore/vue-example-build-env-client-ids
Nov 23, 2026
Merged

arch1995 merged 3 commits into
masterfrom
chore/vue-example-build-env-client-ids

Conversation

@arch1995

@arch1995 arch1995 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Jira Link

N/A

Description

Updates the Vue example (examples/vue-example/src/App.vue) so the client ID is selected per network and per server environment. The auth build env selected in the UI maps to a server environment.

  • Adds SERVER_ENV with the two server environments: production and development.
  • Adds AUTH_TO_SERVER_ENV, which maps each auth BUILD_ENV to a server env:
    • production, staging → server production
    • development, testing → server development
  • OPENLOGIN_PROJECT_IDS is now Record<WEB3AUTH_NETWORK_TYPE, Record<SERVER_ENV_TYPE, string>>.
  • Each network uses the same client ID for both server envs, except sapphire_devnet + server development, which uses a dedicated client ID.
  • The "Select Build Env" dropdown still lists all auth build envs.
  • openloginInstance and setProvider look up the client ID with the selected network and the server env mapped from the selected auth build env.

How has this been tested?

  • npm run lint (no new warnings)
  • npm run typecheck
  • npm run build
  • npm test (all tests pass)
  • vue-tsc --noEmit in examples/vue-example (no errors)

Screenshots (if appropriate)

N/A

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Note

Low Risk
Example-only configuration changes with no impact on the auth library or production runtime.

Overview
The Vue example now picks OpenLogin client IDs from both the selected Web3Auth network and a server environment derived from the UI build env.

production and staging builds use production server client IDs; development and testing use development server IDs. Client ID tables are nested per network × server env (notably Sapphire devnet uses a different development ID). openloginInstance and setProvider resolve the ID via AUTH_TO_SERVER_ENV[selectedBuildEnv]. A patch changeset documents the example behavior.

Reviewed by Cursor Bugbot for commit 0b5755f. Bugbot is set up for automated code reviews on this repo. Configure here.

@arch1995
arch1995 requested a review from a team as a code owner November 23, 2026 13:25
@arch1995 arch1995 changed the title chore: add per-network build env client IDs in vue example chore: map auth build envs to server client IDs in vue example Nov 23, 2026
chaitanyapotti
chaitanyapotti previously approved these changes Nov 23, 2026
@arch1995
arch1995 merged commit e2c625d into master Nov 23, 2026
26 checks passed
@arch1995
arch1995 deleted the chore/vue-example-build-env-client-ids branch November 23, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants