Commit db173b09 authored by Anton's avatar Anton

Fix env defaults

parent 78cbeaca
Pipeline #20036 passed with stage
in 2 minutes and 21 seconds
......@@ -61,11 +61,11 @@ module.exports = function (ctx) {
//
// Hosts
//
API_HOST: JSON.stringify(process.env.API_HOST || 'https://api.motionbank.org'),
SOCKETS_HOST: JSON.stringify(process.env.SOCKETS_HOST || 'https://sockets.motionbank.org'),
STORAGE_HOST: JSON.stringify(process.env.STORAGE_HOST || 'https://storage.motionbank.org'),
PACKAGER_HOST: JSON.stringify(process.env.PACKAGER_HOST || 'https://packager.motionbank.org'),
TRANSCODER_HOST: JSON.stringify(process.env.TRANSCODER_HOST || 'https://transcoder.motionbank.org'),
API_HOST: JSON.stringify(process.env.API_HOST),
SOCKETS_HOST: JSON.stringify(process.env.SOCKETS_HOST),
STORAGE_HOST: JSON.stringify(process.env.STORAGE_HOST),
PACKAGER_HOST: JSON.stringify(process.env.PACKAGER_HOST),
TRANSCODER_HOST: JSON.stringify(process.env.TRANSCODER_HOST),
//
// Resources
//
......@@ -75,16 +75,16 @@ module.exports = function (ctx) {
//
// Auth0
//
AUTH0_DOMAIN: JSON.stringify(process.env.AUTH0_DOMAIN || 'auth.motionbank.org'),
AUTH0_CLIENT_ID: JSON.stringify(process.env.AUTH0_CLIENT_ID || '80t5TRU9MVhGDVnZ522CvX4hutBxDB6U'),
AUTH0_REDIRECT_URL: JSON.stringify(process.env.AUTH0_REDIRECT_URL || null),
AUTH0_AUDIENCE: JSON.stringify(process.env.AUTH0_AUDIENCE || 'https://api.motionbank.org'),
AUTH0_DOMAIN: JSON.stringify(process.env.AUTH0_DOMAIN),
AUTH0_CLIENT_ID: JSON.stringify(process.env.AUTH0_CLIENT_ID),
AUTH0_REDIRECT_URL: JSON.stringify(process.env.AUTH0_REDIRECT_URL),
AUTH0_AUDIENCE: JSON.stringify(process.env.AUTH0_AUDIENCE),
//
// API Keys
//
SENTRY_DSN: JSON.stringify(process.env.SENTRY_DSN || null),
YOUTUBE_API_KEY: JSON.stringify(process.env.YOUTUBE_API_KEY || null),
VIMEO_ACCESS_TOKEN: JSON.stringify(process.env.VIMEO_ACCESS_TOKEN || null),
SENTRY_DSN: JSON.stringify(process.env.SENTRY_DSN),
YOUTUBE_API_KEY: JSON.stringify(process.env.YOUTUBE_API_KEYl),
VIMEO_ACCESS_TOKEN: JSON.stringify(process.env.VIMEO_ACCESS_TOKEN),
//
// App config
//
......
......@@ -3,15 +3,15 @@ import WebAuth from 'mbjs-api-client/src/web'
export default ({ Vue }) => {
const apiClient = new WebAuth({
auth: {
domain: process.env.AUTH0_DOMAIN,
clientID: process.env.AUTH0_CLIENT_ID,
domain: process.env.AUTH0_DOMAIN || window.AUTH0_DOMAIN,
clientID: process.env.AUTH0_CLIENT_ID || window.AUTH0_CLIENT_ID,
redirectUri: process.env.AUTH0_REDIRECT_URL || `${document.location.origin}/users/callback`,
audience: process.env.AUTH0_AUDIENCE,
audience: process.env.AUTH0_AUDIENCE || window.AUTH0_AUDIENCE,
scope: 'openid profile read write',
responseType: 'token id_token',
prompt: 'none'
},
host: process.env.API_HOST
host: process.env.API_HOST || window.API_HOST
})
Vue.prototype.$api = apiClient
}
......@@ -8,10 +8,10 @@ export default ({ Vue }) => {
}
else {
authService = new AuthServiceWeb({
domain: window.AUTH0_DOMAIN || process.env.AUTH0_DOMAIN,
clientID: window.AUTH0_CLIENT_ID || process.env.AUTH0_CLIENT_ID,
redirectUri: `${document.location.origin}/users/callback`,
audience: window.AUTH0_AUDIENCE || process.env.AUTH0_AUDIENCE,
domain: process.env.AUTH0_DOMAIN || window.AUTH0_DOMAIN,
clientID: process.env.AUTH0_CLIENT_ID || window.AUTH0_CLIENT_ID,
redirectUri: process.env.AUTH0_REDIRECT_URL || `${document.location.origin}/users/callback`,
audience: process.env.AUTH0_AUDIENCE || window.AUTH0_AUDIENCE,
scope: 'openid profile read write',
responseType: 'token id_token',
prompt: 'none'
......
......@@ -48,14 +48,15 @@ else {
/** Instantiate Motion Bank API Client */
apiClient = new WebAuth({
auth: {
domain: process.env.AUTH0_DOMAIN,
clientID: process.env.AUTH0_CLIENT_ID,
domain: process.env.AUTH0_DOMAIN || window.AUTH0_DOMAIN,
clientID: process.env.AUTH0_CLIENT_ID || window.AUTH0_CLIENT_ID,
redirectUri: process.env.AUTH0_REDIRECT_URL || `${document.location.origin}/users/callback`,
audience: process.env.AUTH0_AUDIENCE,
audience: process.env.AUTH0_AUDIENCE || window.AUTH0_AUDIENCE,
scope: 'openid profile read write',
responseType: 'token id_token'
responseType: 'token id_token',
prompt: 'none'
},
host: process.env.API_HOST
host: process.env.API_HOST || window.API_HOST
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment