55 * import { constants } from 'react-redux-firebase'
66 * constants.actionsPrefix === '@@reactReduxFirebase' // true
77*/
8- export const actionsPrefix = '@@reactReduxFirebase/ '
8+ export const actionsPrefix = '@@reactReduxFirebase'
99
1010/** @constant
1111 * @description Object containing all action types
@@ -18,25 +18,35 @@ export const actionsPrefix = '@@reactReduxFirebase/'
1818 * constants.actionTypes.SET === '@@reactReduxFirebase/SET' // true
1919*/
2020export const actionTypes = {
21- START : `${ actionsPrefix } START` ,
22- SET : `${ actionsPrefix } SET` ,
23- SET_PROFILE : `${ actionsPrefix } SET_PROFILE` ,
24- LOGIN : `${ actionsPrefix } LOGIN` ,
25- LOGOUT : `${ actionsPrefix } LOGOUT` ,
26- LOGIN_ERROR : `${ actionsPrefix } LOGIN_ERROR` ,
27- NO_VALUE : `${ actionsPrefix } NO_VALUE` ,
28- UNAUTHORIZED_ERROR : `${ actionsPrefix } UNAUTHORIZED_ERROR` ,
29- ERROR : `${ actionsPrefix } ERROR` ,
30- INIT_BY_PATH : `${ actionsPrefix } INIT_BY_PATH` ,
31- AUTHENTICATION_INIT_STARTED : `${ actionsPrefix } AUTHENTICATION_INIT_STARTED` ,
32- AUTHENTICATION_INIT_FINISHED : `${ actionsPrefix } AUTHENTICATION_INIT_FINISHED` ,
33- FILE_UPLOAD_START : `${ actionsPrefix } FILE_UPLOAD_START` ,
34- FILE_UPLOAD_ERROR : `${ actionsPrefix } FILE_UPLOAD_ERROR` ,
35- FILE_UPLOAD_PROGRESS : `${ actionsPrefix } FILE_UPLOAD_PROGRESS` ,
36- FILE_UPLOAD_COMPLETE : `${ actionsPrefix } FILE_UPLOAD_COMPLETE` ,
37- FILE_DELETE_START : `${ actionsPrefix } FILE_DELETE_START` ,
38- FILE_DELETE_ERROR : `${ actionsPrefix } FILE_DELETE_ERROR` ,
39- FILE_DELETE_COMPLETE : `${ actionsPrefix } FILE_DELETE_COMPLETE`
21+ START : `${ actionsPrefix } /START` ,
22+ SET : `${ actionsPrefix } /SET` ,
23+ SET_PROFILE : `${ actionsPrefix } /SET_PROFILE` ,
24+ LOGIN : `${ actionsPrefix } /LOGIN` ,
25+ LOGOUT : `${ actionsPrefix } /LOGOUT` ,
26+ LOGIN_ERROR : `${ actionsPrefix } /LOGIN_ERROR` ,
27+ NO_VALUE : `${ actionsPrefix } /NO_VALUE` ,
28+ UNAUTHORIZED_ERROR : `${ actionsPrefix } /UNAUTHORIZED_ERROR` ,
29+ ERROR : `${ actionsPrefix } /ERROR` ,
30+ INIT_BY_PATH : `${ actionsPrefix } /INIT_BY_PATH` ,
31+ AUTHENTICATION_INIT_STARTED : `${ actionsPrefix } /AUTHENTICATION_INIT_STARTED` ,
32+ AUTHENTICATION_INIT_FINISHED : `${ actionsPrefix } /AUTHENTICATION_INIT_FINISHED` ,
33+ FILE_UPLOAD_START : `${ actionsPrefix } /FILE_UPLOAD_START` ,
34+ FILE_UPLOAD_ERROR : `${ actionsPrefix } /FILE_UPLOAD_ERROR` ,
35+ FILE_UPLOAD_PROGRESS : `${ actionsPrefix } /FILE_UPLOAD_PROGRESS` ,
36+ FILE_UPLOAD_COMPLETE : `${ actionsPrefix } /FILE_UPLOAD_COMPLETE` ,
37+ FILE_DELETE_START : `${ actionsPrefix } /FILE_DELETE_START` ,
38+ FILE_DELETE_ERROR : `${ actionsPrefix } /FILE_DELETE_ERROR` ,
39+ FILE_DELETE_COMPLETE : `${ actionsPrefix } /FILE_DELETE_COMPLETE`
40+ }
41+
42+ /** @constant
43+ * @description Default configuration options
44+ * @type {Array }
45+ */
46+ export const defaultConfig = {
47+ userProfile : null ,
48+ enableLogging : false ,
49+ updateProfileOnLogin : true
4050}
4151
4252/** @constant
@@ -56,7 +66,7 @@ export const supportedAuthProviders = [
5666 * @type {Array }
5767 * @private
5868*/
59- export const defaultJWTKeys = [
69+ export const defaultJWTProps = [
6070 'aud' ,
6171 'auth_time' ,
6272 'exp' ,
@@ -67,14 +77,31 @@ export const defaultJWTKeys = [
6777 'user_id'
6878]
6979
80+ /** @constant
81+ * @description Default initial props used when running firebase.initializeApp
82+ * @type {Array }
83+ * @private
84+ */
85+ export const defaultInitProps = [
86+ 'apiKey' ,
87+ 'authDomain' ,
88+ 'databaseURL' ,
89+ 'storageBucket' ,
90+ 'messagingSenderId'
91+ ]
92+
7093export default {
71- defaultJWTKeys ,
94+ defaultJWTProps ,
7295 actionTypes,
73- supportedAuthProviders
96+ defaultConfig,
97+ supportedAuthProviders,
98+ defaultInitProps
7499}
75100
76101module . exports = {
77- defaultJWTKeys ,
102+ defaultJWTProps ,
78103 actionTypes,
79- supportedAuthProviders
104+ defaultConfig,
105+ supportedAuthProviders,
106+ defaultInitProps
80107}
0 commit comments