-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Use the same secrets file across WordPress, Jetpack, and Reader #25803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Changes from all commits
04991b8
78eab4e
db82159
bbf8b86
d307d50
f36f7c3
50b23a6
78ff447
75ac465
e04d3b5
734d36f
8aa1cf2
4224877
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,18 +10,6 @@ public struct BuildSecrets: Sendable { | |
| } | ||
| } | ||
|
|
||
| public struct Google: Sendable { | ||
| public let clientId: String | ||
| public let schemeId: String | ||
| public let serverClientId: String | ||
|
|
||
| public init(clientId: String, schemeId: String, serverClientId: String) { | ||
| self.clientId = clientId | ||
| self.schemeId = schemeId | ||
| self.serverClientId = serverClientId | ||
| } | ||
| } | ||
|
|
||
| public struct Zendesk: Sendable { | ||
| public let appId: String | ||
| public let url: String | ||
|
|
@@ -35,27 +23,18 @@ public struct BuildSecrets: Sendable { | |
| } | ||
|
|
||
| public let oauth: OAuth | ||
| public let google: Google | ||
| public let zendesk: Zendesk | ||
| public let sentryDSN: String | ||
| public let docsBotId: String | ||
|
Comment on lines
-40
to
-41
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both Sentry's DSN and Docs Bot identifier are designed to be public. The links to the respective documentation are in the new properties definitions below.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I assumed Docs Bot is actually in use, but haven't verified it. From the code, I can see that it's Jetpack-only and behind a feature flag. @jkmassel @crazytonyli if the flag is off and the integration no longer needed, I can create a follow up to delete it and it's code usages from the app. Otherwise, maybe we could refine to use a |
||
| public let encryptedLogsKey: String | ||
| public let debuggingKey: String | ||
|
|
||
| public init( | ||
| oauth: OAuth, | ||
| google: Google, | ||
| zendesk: Zendesk, | ||
| sentryDSN: String, | ||
| docsBotId: String, | ||
| encryptedLogsKey: String, | ||
| debuggingKey: String | ||
| ) { | ||
| self.oauth = oauth | ||
| self.google = google | ||
| self.zendesk = zendesk | ||
| self.sentryDSN = sentryDSN | ||
| self.docsBotId = docsBotId | ||
| self.encryptedLogsKey = encryptedLogsKey | ||
| self.debuggingKey = debuggingKey | ||
| } | ||
|
|
@@ -65,10 +44,7 @@ extension BuildSecrets { | |
|
|
||
| public static let dummy = BuildSecrets( | ||
| oauth: .init(client: "", secret: ""), | ||
| google: .init(clientId: "", schemeId: "", serverClientId: ""), | ||
| zendesk: .init(appId: "", url: "", clientId: ""), | ||
| sentryDSN: "", | ||
| docsBotId: "", | ||
| encryptedLogsKey: "", | ||
| debuggingKey: "" | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,9 @@ extension BuildSettings { | |
| zendeskSourcePlatform = bundle.infoValue(forKey: "WPZendeskSourcePlatform") | ||
| mobileAnnounceAppID = bundle.infoValue(forKey: "WPMobileAnnounceAppID") | ||
| authKeychainServiceName = bundle.infoValue(forKey: "WPAuthKeychainServiceName") | ||
| // The plist does not carry the URL scheme because the C preprocessor treats the `//` as a comment resulting in a truncated value. | ||
| sentryDSN = "https://" + bundle.infoValue(forKey: "WPSentryNoSchemeDSN") | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tracked https://linear.app/a8c/issue/AINFRA-2713 to follow up on making the "no scheme" requirement clearer in the whole |
||
| docsBotId = bundle.infoValue(forKey: "WPDocsBotId") | ||
| } | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,6 @@ | ||
| # Lists of input files for the script that populates the app's secrets with the | ||
| # correct values for the current scheme and build configuration. | ||
| ${HOME}/.configure/wordpress-ios/secrets/WordPress-Secrets.swift | ||
| ${HOME}/.configure/wordpress-ios/secrets/WordPress-Secrets-Internal.swift | ||
| ${HOME}/.configure/wordpress-ios/secrets/WordPress-Secrets-Alpha.swift | ||
| ${HOME}/.configure/wordpress-ios/secrets/Jetpack-Secrets.swift | ||
| ${HOME}/.configure/wordpress-ios/secrets/Reader-Secrets.swift | ||
| ${HOME}/.configure/wordpress-ios/secrets/Secrets.swift | ||
|
|
||
| # Local Secrets file that external contributors can use to specify their own | ||
| # ClientID and Secrets. This file is created by the Rakefile when external | ||
|
|
@@ -18,4 +14,4 @@ ${SRCROOT}/Credentials/Secrets-example.swift | |
|
|
||
| # Add the script that uses this file as a source, so that, if the script | ||
| # changes, Xcode will run it again on the next build. | ||
| ${SRCROOT}/../Scripts/BuildPhases/ApplyConfiguration.sh | ||
| ${SRCROOT}/../Scripts/BuildPhases/GenerateCredentials.sh | ||
|
Comment on lines
-21
to
+17
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a little inconsistency that had gone unnoticed so far. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Google login was removed recently, see #25644 and #25645. We don't need to track the credentials anymore.