-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.config.js
More file actions
48 lines (45 loc) · 1.39 KB
/
app.config.js
File metadata and controls
48 lines (45 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// @ts-check
// eslint-disable-next-line @typescript-eslint/no-require-imports
const dotenv = require("dotenv");
dotenv.config({ quiet: true });
/** @param {import("expo/config").ConfigContext} param0 */
module.exports = ({ config }) => {
const isDebug = process.env.APP_VARIANT === "debug";
const oauthConfig = config.extra?.oauth ?? {};
return {
...config,
name: isDebug ? "Awesome GH (Debug)" : config.name,
android: {
...config.android,
package: isDebug
? "com.involvex.awesomegithubapp.debug"
: config.android?.package,
},
ios: {
...config.ios,
bundleIdentifier: isDebug
? "com.involvex.awesomegithubapp.debug"
: config.ios?.bundleIdentifier,
},
extra: {
...config.extra,
oauth: {
...oauthConfig,
githubClientId:
process.env.GITHUB_CLIENT_ID_NATIVE ??
process.env.GITHUB_CLIENT_ID ??
oauthConfig.githubClientId ??
"",
// Web-only OAuth app — separate GitHub OAuth App with localhost callback
webGithubClientId:
process.env.GITHUB_CLIENT_ID_WEB ??
oauthConfig.webGithubClientId ??
"",
webTokenExchangeUrl:
process.env.GITHUB_WEB_TOKEN_EXCHANGE_URL ??
oauthConfig.webTokenExchangeUrl ??
"https://awesomegithubapp-api.involvex.workers.dev/token",
},
},
};
};