Skip to content

Source OAuth credentials from xcconfig at compile time - #55

Merged
otaviocc merged 2 commits into
mainfrom
feature/xcconfig-oauth-credentials
Jun 28, 2026
Merged

Source OAuth credentials from xcconfig at compile time#55
otaviocc merged 2 commits into
mainfrom
feature/xcconfig-oauth-credentials

Conversation

@otaviocc

Copy link
Copy Markdown
Owner

Moves OMGLOL_CLIENT_ID, OMGLOL_CLIENT_SECRET, and OMGLOL_REDIRECT_URI out of the hardcoded AuthRequestFactory and out of Info.plist. A new GenerateOAuthSecrets build phase reads the three xcconfig values (available as env vars during the build) and writes a Swift source file to DERIVED_FILE_DIR; that file is compiled directly into the binary so the secrets never appear in any bundle resource.

On the Swift side, AuthRequestFactory is refactored from a static-method enum to an injectable struct that holds an OAuthClientConfiguration value, and the configuration is threaded through the Auth package's factory and environment chain. Scripts/setup-environment.zsh is now superseded — credentials go in Config/Triton.local.xcconfig instead.

Moves OMGLOL_CLIENT_ID, OMGLOL_CLIENT_SECRET, and OMGLOL_REDIRECT_URI out
of the hardcoded AuthRequestFactory and out of Info.plist. A new
GenerateOAuthSecrets build phase reads the three xcconfig values (available
as env vars during the build) and writes a Swift source file to
DERIVED_FILE_DIR; that file is compiled directly into the binary so the
secrets never appear in any bundle resource.

On the Swift side, AuthRequestFactory is refactored from a static-method
enum to an injectable struct that holds an OAuthClientConfiguration value,
and the configuration is threaded through the Auth package's factory and
environment chain. Scripts/setup-environment.zsh is now superseded —
credentials go in Config/Triton.local.xcconfig instead.
@otaviocc otaviocc self-assigned this Jun 28, 2026
@otaviocc
otaviocc enabled auto-merge (rebase) June 28, 2026 05:22
@otaviocc
otaviocc merged commit 14eebfa into main Jun 28, 2026
4 checks passed
@otaviocc
otaviocc deleted the feature/xcconfig-oauth-credentials branch June 28, 2026 05:23
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.

1 participant