backend-manager 5.0.77 → 5.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -24,7 +24,6 @@ function buildPublicConfig(config) {
|
|
|
24
24
|
user: config.github?.user,
|
|
25
25
|
repo: (config.github?.repo_website || '').split('/').pop(),
|
|
26
26
|
},
|
|
27
|
-
authentication: config.authentication || {},
|
|
28
27
|
reviews: config.reviews || {},
|
|
29
28
|
firebaseConfig: config.firebaseConfig || {},
|
|
30
29
|
products: (config.products || []).map(p => ({
|
|
@@ -13,18 +13,16 @@
|
|
|
13
13
|
combomark: 'https://example.com/combomark.png',
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
|
+
reviews: {
|
|
17
|
+
enabled: true,
|
|
18
|
+
sites: [
|
|
19
|
+
'trustpilot.com',
|
|
20
|
+
],
|
|
21
|
+
},
|
|
16
22
|
github: {
|
|
17
23
|
user: 'username',
|
|
18
24
|
repo_website: 'https://github.com/username/backend-manager',
|
|
19
25
|
},
|
|
20
|
-
authentication: {
|
|
21
|
-
'password': { enabled: true },
|
|
22
|
-
'google.com': { enabled: true },
|
|
23
|
-
},
|
|
24
|
-
reviews: {
|
|
25
|
-
enabled: true,
|
|
26
|
-
sites: [],
|
|
27
|
-
},
|
|
28
26
|
sentry: {
|
|
29
27
|
dsn: 'https://d965557418748jd749d837asf00552f@o777489.ingest.sentry.io/8789941',
|
|
30
28
|
},
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GET /firebase/providers - Get authentication providers
|
|
3
|
-
* Returns enabled auth providers for the app
|
|
4
|
-
*/
|
|
5
|
-
const { merge } = require('lodash');
|
|
6
|
-
|
|
7
|
-
module.exports = async ({ assistant, Manager, analytics }) => {
|
|
8
|
-
const defaultProviders = {
|
|
9
|
-
['password']: {
|
|
10
|
-
enabled: true,
|
|
11
|
-
},
|
|
12
|
-
['google.com']: {
|
|
13
|
-
enabled: true,
|
|
14
|
-
},
|
|
15
|
-
['facebook.com']: {
|
|
16
|
-
enabled: false,
|
|
17
|
-
},
|
|
18
|
-
['twitter.com']: {
|
|
19
|
-
enabled: false,
|
|
20
|
-
},
|
|
21
|
-
['github.com']: {
|
|
22
|
-
enabled: false,
|
|
23
|
-
},
|
|
24
|
-
['microsoft.com']: {
|
|
25
|
-
enabled: false,
|
|
26
|
-
},
|
|
27
|
-
['yahoo.com']: {
|
|
28
|
-
enabled: false,
|
|
29
|
-
},
|
|
30
|
-
['apple.com']: {
|
|
31
|
-
enabled: false,
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// Merge the default providers with the config providers
|
|
36
|
-
const providers = merge(defaultProviders, Manager.config.authentication || {});
|
|
37
|
-
|
|
38
|
-
// Reformat the object so it's just provider=true/false
|
|
39
|
-
const finalProviders = {};
|
|
40
|
-
Object.keys(providers).forEach(key => {
|
|
41
|
-
finalProviders[key] = providers[key].enabled;
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
assistant.log('Providers', finalProviders);
|
|
45
|
-
|
|
46
|
-
// Track analytics
|
|
47
|
-
analytics.event('firebase/providers', { action: 'get' });
|
|
48
|
-
|
|
49
|
-
return assistant.respond(finalProviders);
|
|
50
|
-
};
|