Skip to content

Commit 14a63d2

Browse files
committed
add auth docs
1 parent 94557aa commit 14a63d2

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

src/Options/Definitions.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ module.exports.ParseServerOptions = {
9595
env: 'PARSE_SERVER_AUTH_PROVIDERS',
9696
help:
9797
'Configuration for your authentication providers, as stringified JSON. See http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication',
98-
action: parsers.objectParser,
98+
action: parsers.arrayParser,
9999
},
100100
cacheAdapter: {
101101
env: 'PARSE_SERVER_CACHE_ADAPTER',
@@ -876,3 +876,11 @@ module.exports.DatabaseOptions = {
876876
default: false,
877877
},
878878
};
879+
module.exports.AuthAdapter = {
880+
enabled: {
881+
env: 'undefinedENABLED',
882+
help: 'Is `true` if the auth adapter is enabled, `false` otherwise.',
883+
action: parsers.booleanParser,
884+
default: true,
885+
},
886+
};

src/Options/docs.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
* @property {Adapter<AnalyticsAdapter>} analyticsAdapter Adapter module for the analytics
2020
* @property {String} appId Your Parse Application ID
2121
* @property {String} appName Sets the app name
22-
* @property {Any} auth Configuration for your authentication providers, as stringified JSON. See http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication
22+
* @property {AuthAdapter[]} auth Configuration for your authentication providers, as stringified JSON. See http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication
2323
* @property {Adapter<CacheAdapter>} cacheAdapter Adapter module for the cache
2424
* @property {Number} cacheMaxSize Sets the maximum size for the in memory cache, defaults to 10000
2525
* @property {Number} cacheTTL Sets the TTL for the in memory cache (in ms), defaults to 5000 (5 seconds)
@@ -208,3 +208,8 @@
208208
* @interface DatabaseOptions
209209
* @property {Boolean} enableSchemaHooks Enables database real-time hooks to update single schema cache. Set to `true` if using multiple Parse Servers instances connected to the same database. Failing to do so will cause a schema change to not propagate to all instances and re-syncing will only happen when the instances restart. To use this feature with MongoDB, a replica set cluster with [change stream](https://docs.mongodb.com/manual/changeStreams/#availability) support is required.
210210
*/
211+
212+
/**
213+
* @interface AuthAdapter
214+
* @property {Boolean} enabled Is `true` if the auth adapter is enabled, `false` otherwise.
215+
*/

src/Options/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ export interface ParseServerOptions {
140140
allowCustomObjectId: ?boolean;
141141
/* Configuration for your authentication providers, as stringified JSON. See http://docs.parseplatform.org/parse-server/guide/#oauth-and-3rd-party-authentication
142142
:ENV: PARSE_SERVER_AUTH_PROVIDERS */
143-
auth: ?any;
143+
auth: ?(AuthAdapter[]);
144144
/* Max file size for uploads, defaults to 20mb
145145
:DEFAULT: 20mb */
146146
maxUploadSize: ?string;
@@ -506,3 +506,9 @@ export interface DatabaseOptions {
506506
:DEFAULT: false */
507507
enableSchemaHooks: ?boolean;
508508
}
509+
510+
export interface AuthAdapter {
511+
/* Is `true` if the auth adapter is enabled, `false` otherwise.
512+
:DEFAULT: true */
513+
enabled: ?boolean;
514+
}

0 commit comments

Comments
 (0)