Skip to content

Commit d7eff74

Browse files
authored
Merge 11f48f9 into 446cbb1
2 parents 446cbb1 + 11f48f9 commit d7eff74

File tree

5 files changed

+34
-3
lines changed

5 files changed

+34
-3
lines changed

spec/CLI.spec.js

+21
Original file line numberDiff line numberDiff line change
@@ -302,4 +302,25 @@ describe('execution', () => {
302302
done.fail(data.toString());
303303
});
304304
});
305+
306+
it('can start Parse Server with auth via CLI', done => {
307+
const env = { ...process.env };
308+
env.NODE_OPTIONS = '--dns-result-order=ipv4first';
309+
childProcess = spawn(
310+
binPath,
311+
['--databaseURI', databaseURI, './spec/configs/CLIConfigAuth.json'],
312+
{ env }
313+
);
314+
childProcess.stdout.on('data', data => {
315+
data = data.toString();
316+
console.log(data);
317+
if (data.includes('parse-server running on')) {
318+
done();
319+
}
320+
});
321+
childProcess.stderr.on('data', data => {
322+
data = data.toString();
323+
done.fail(data.toString());
324+
});
325+
});
305326
});

spec/configs/CLIConfigAuth.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"appName": "test",
3+
"appId": "test",
4+
"masterKey": "test",
5+
"logLevel": "error",
6+
"auth": {
7+
"facebook": {
8+
"appIds": "test"
9+
}
10+
}
11+
}

src/Options/Definitions.js

-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ module.exports.ParseServerOptions = {
103103
env: 'PARSE_SERVER_AUTH_PROVIDERS',
104104
help:
105105
'Configuration for your authentication providers, as stringified JSON. See http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication',
106-
action: parsers.arrayParser,
107106
},
108107
cacheAdapter: {
109108
env: 'PARSE_SERVER_CACHE_ADAPTER',

src/Options/docs.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Options/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export interface ParseServerOptions {
149149
allowCustomObjectId: ?boolean;
150150
/* Configuration for your authentication providers, as stringified JSON. See http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication
151151
:ENV: PARSE_SERVER_AUTH_PROVIDERS */
152-
auth: ?(AuthAdapter[]);
152+
auth: ?{ [string]: AuthAdapter };
153153
/* Max file size for uploads, defaults to 20mb
154154
:DEFAULT: 20mb */
155155
maxUploadSize: ?string;

0 commit comments

Comments
 (0)