@mjhls/mjh-framework 1.0.791-auth-test-v2 → 1.0.791-auth-test-v3
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/dist/cjs/AuthWrapper.js +43 -59
- package/dist/cjs/faundadb.js +4 -6
- package/dist/esm/AuthWrapper.js +43 -59
- package/dist/esm/faundadb.js +4 -6
- package/package.json +1 -1
package/dist/cjs/AuthWrapper.js
CHANGED
|
@@ -2823,10 +2823,10 @@ var _skeletonTheme = _interopRequireDefault(skeletonTheme);
|
|
|
2823
2823
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2824
2824
|
});
|
|
2825
2825
|
|
|
2826
|
-
|
|
2826
|
+
_commonjsHelpers.unwrapExports(lib);
|
|
2827
2827
|
|
|
2828
|
-
var css = ".AuthWrapper-module_loginBox__3l-BE {\n
|
|
2829
|
-
var styles = { "loginBox": "AuthWrapper-module_loginBox__3l-BE", "loginBox_title": "AuthWrapper-module_loginBox_title__12rGD", "bar": "AuthWrapper-module_bar__1dafn" };
|
|
2828
|
+
var css = ".AuthWrapper-module_loginBox__3l-BE {\n margin-bottom: 2rem;\n width: 350px;\n max-width: 90vw;\n margin-left: auto;\n margin-right: auto;\n /* box-shadow: 2px 5px 12px rgba(0, 0, 0, 0.15); */\n background: #fff;\n z-index: 1;\n}\n.AuthWrapper-module_loginBox_title__12rGD {\n margin-bottom: 2rem;\n text-align: center;\n}\n.AuthWrapper-module_bar__1dafn {\n background: #eee;\n margin-left: unset;\n margin-right: unset;\n}\n.AuthWrapper-module_bar__1dafn:nth-child(1) {\n float: left;\n border-right: 1rem solid #fff;\n background: rgb(245, 245, 245);\n height: 10rem;\n width: 25%;\n margin-left: auto;\n margin-right: auto;\n margin-bottom: 2rem;\n}\n.AuthWrapper-module_bar__1dafn:nth-child(2n) {\n width: 97%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(3n) {\n width: 96%;\n height: 1.5rem;\n margin-bottom: 1.5rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(4n) {\n width: 72%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(5n) {\n width: 88%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n\n.AuthWrapper-module_iframe__2wDJW {\n border: none;\n width: 100%;\n height: 1900px;\n}";
|
|
2829
|
+
var styles = { "loginBox": "AuthWrapper-module_loginBox__3l-BE", "loginBox_title": "AuthWrapper-module_loginBox_title__12rGD", "bar": "AuthWrapper-module_bar__1dafn", "iframe": "AuthWrapper-module_iframe__2wDJW" };
|
|
2830
2830
|
styleInject_es.styleInject(css);
|
|
2831
2831
|
|
|
2832
2832
|
var AuthWrapper = function AuthWrapper(_ref) {
|
|
@@ -2871,73 +2871,57 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
2871
2871
|
return React__default['default'].createElement(
|
|
2872
2872
|
'div',
|
|
2873
2873
|
{ style: { position: 'relative', minHeight: '300px', paddingTop: '2rem' } },
|
|
2874
|
-
React__default['default'].createElement(
|
|
2875
|
-
'div',
|
|
2876
|
-
{ style: { display: 'flex' } },
|
|
2877
|
-
React__default['default'].createElement(
|
|
2878
|
-
'div',
|
|
2879
|
-
null,
|
|
2880
|
-
React__default['default'].createElement(Skeleton, { reactangle: true, height: 120, width: 120 })
|
|
2881
|
-
),
|
|
2882
|
-
React__default['default'].createElement(
|
|
2883
|
-
'div',
|
|
2884
|
-
{ style: { maxWidth: '76%', minWidth: '76%', marginLeft: '2rem' } },
|
|
2885
|
-
React__default['default'].createElement(Skeleton, { count: 4 })
|
|
2886
|
-
)
|
|
2887
|
-
),
|
|
2888
|
-
React__default['default'].createElement('br', null),
|
|
2889
|
-
React__default['default'].createElement(Skeleton, { count: 8 }),
|
|
2890
2874
|
callbackUrl && React__default['default'].createElement(
|
|
2891
2875
|
'div',
|
|
2892
|
-
|
|
2876
|
+
null,
|
|
2893
2877
|
React__default['default'].createElement(
|
|
2894
2878
|
'div',
|
|
2895
|
-
{ className: styles.
|
|
2879
|
+
{ className: styles.loginBox },
|
|
2896
2880
|
React__default['default'].createElement(
|
|
2897
|
-
'
|
|
2898
|
-
|
|
2899
|
-
'
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
{ onSubmit: function onSubmit(e) {
|
|
2905
|
-
return e.preventDefault();
|
|
2906
|
-
} },
|
|
2907
|
-
React__default['default'].createElement(
|
|
2908
|
-
reactBootstrap.Form.Group,
|
|
2909
|
-
{ controlId: 'email' },
|
|
2910
|
-
React__default['default'].createElement(reactBootstrap.Form.Control, { type: 'email', onChange: function onChange(e) {
|
|
2911
|
-
return setEmail(e.target.value);
|
|
2912
|
-
}, placeholder: 'Email' })
|
|
2881
|
+
'div',
|
|
2882
|
+
{ className: styles.loginBox_title },
|
|
2883
|
+
React__default['default'].createElement(
|
|
2884
|
+
'b',
|
|
2885
|
+
null,
|
|
2886
|
+
'Please log in to view this content.'
|
|
2887
|
+
)
|
|
2913
2888
|
),
|
|
2914
2889
|
React__default['default'].createElement(
|
|
2915
|
-
reactBootstrap.Form
|
|
2916
|
-
{
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2890
|
+
reactBootstrap.Form,
|
|
2891
|
+
{ onSubmit: function onSubmit(e) {
|
|
2892
|
+
return e.preventDefault();
|
|
2893
|
+
} },
|
|
2894
|
+
React__default['default'].createElement(
|
|
2895
|
+
reactBootstrap.Form.Group,
|
|
2896
|
+
{ controlId: 'email' },
|
|
2897
|
+
React__default['default'].createElement(reactBootstrap.Form.Control, { type: 'email', onChange: function onChange(e) {
|
|
2898
|
+
return setEmail(e.target.value);
|
|
2899
|
+
}, placeholder: 'Email' })
|
|
2900
|
+
),
|
|
2901
|
+
React__default['default'].createElement(
|
|
2902
|
+
reactBootstrap.Form.Group,
|
|
2903
|
+
{ controlId: 'password' },
|
|
2904
|
+
React__default['default'].createElement(reactBootstrap.Form.Control, { type: 'password', onChange: function onChange(e) {
|
|
2905
|
+
return setPassword(e.target.value);
|
|
2906
|
+
}, placeholder: 'Password' })
|
|
2907
|
+
),
|
|
2908
|
+
React__default['default'].createElement(
|
|
2909
|
+
'button',
|
|
2910
|
+
{ className: 'btn btn-primary btn-block', onClick: function onClick() {
|
|
2911
|
+
return client.signIn('credentials', { email: email, password: password, callbackUrl: callbackUrl });
|
|
2912
|
+
} },
|
|
2913
|
+
'Sign in'
|
|
2914
|
+
)
|
|
2920
2915
|
),
|
|
2921
2916
|
React__default['default'].createElement(
|
|
2922
|
-
'
|
|
2923
|
-
{ className: '
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
'
|
|
2917
|
+
'p',
|
|
2918
|
+
{ className: 'mt-2 mb-0' },
|
|
2919
|
+
'Don\'t have an account?',
|
|
2920
|
+
' ',
|
|
2921
|
+
'Please register below.'
|
|
2927
2922
|
)
|
|
2928
2923
|
),
|
|
2929
|
-
React__default['default'].createElement(
|
|
2930
|
-
'p',
|
|
2931
|
-
{ className: 'mt-2 mb-0' },
|
|
2932
|
-
'Don\'t have an account?',
|
|
2933
|
-
' ',
|
|
2934
|
-
React__default['default'].createElement(
|
|
2935
|
-
'a',
|
|
2936
|
-
{ style: { color: 'blue', textDecoration: 'underline' }, href: formUrl, target: '_blank', rel: 'noopener' },
|
|
2937
|
-
'Register here'
|
|
2938
|
-
),
|
|
2939
|
-
'.'
|
|
2940
|
-
)
|
|
2924
|
+
React__default['default'].createElement('iframe', { className: styles.iframe, src: formUrl })
|
|
2941
2925
|
)
|
|
2942
2926
|
);
|
|
2943
2927
|
} else {
|
package/dist/cjs/faundadb.js
CHANGED
|
@@ -177,23 +177,21 @@ var authenticateUser = function () {
|
|
|
177
177
|
|
|
178
178
|
case 8:
|
|
179
179
|
isAuth = _context3.sent;
|
|
180
|
-
|
|
181
|
-
console.log(isAuth, password, hashedPassword);
|
|
182
180
|
return _context3.abrupt('return', isAuth ? { email: email } : false);
|
|
183
181
|
|
|
184
|
-
case
|
|
185
|
-
_context3.prev =
|
|
182
|
+
case 12:
|
|
183
|
+
_context3.prev = 12;
|
|
186
184
|
_context3.t0 = _context3['catch'](0);
|
|
187
185
|
|
|
188
186
|
console.log(_context3.t0);
|
|
189
187
|
return _context3.abrupt('return', false);
|
|
190
188
|
|
|
191
|
-
case
|
|
189
|
+
case 16:
|
|
192
190
|
case 'end':
|
|
193
191
|
return _context3.stop();
|
|
194
192
|
}
|
|
195
193
|
}
|
|
196
|
-
}, _callee3, this, [[0,
|
|
194
|
+
}, _callee3, this, [[0, 12]]);
|
|
197
195
|
}));
|
|
198
196
|
|
|
199
197
|
return function authenticateUser(_x3, _x4) {
|
package/dist/esm/AuthWrapper.js
CHANGED
|
@@ -2817,10 +2817,10 @@ var _skeletonTheme = _interopRequireDefault(skeletonTheme);
|
|
|
2817
2817
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2818
2818
|
});
|
|
2819
2819
|
|
|
2820
|
-
|
|
2820
|
+
unwrapExports(lib);
|
|
2821
2821
|
|
|
2822
|
-
var css = ".AuthWrapper-module_loginBox__3l-BE {\n
|
|
2823
|
-
var styles = { "loginBox": "AuthWrapper-module_loginBox__3l-BE", "loginBox_title": "AuthWrapper-module_loginBox_title__12rGD", "bar": "AuthWrapper-module_bar__1dafn" };
|
|
2822
|
+
var css = ".AuthWrapper-module_loginBox__3l-BE {\n margin-bottom: 2rem;\n width: 350px;\n max-width: 90vw;\n margin-left: auto;\n margin-right: auto;\n /* box-shadow: 2px 5px 12px rgba(0, 0, 0, 0.15); */\n background: #fff;\n z-index: 1;\n}\n.AuthWrapper-module_loginBox_title__12rGD {\n margin-bottom: 2rem;\n text-align: center;\n}\n.AuthWrapper-module_bar__1dafn {\n background: #eee;\n margin-left: unset;\n margin-right: unset;\n}\n.AuthWrapper-module_bar__1dafn:nth-child(1) {\n float: left;\n border-right: 1rem solid #fff;\n background: rgb(245, 245, 245);\n height: 10rem;\n width: 25%;\n margin-left: auto;\n margin-right: auto;\n margin-bottom: 2rem;\n}\n.AuthWrapper-module_bar__1dafn:nth-child(2n) {\n width: 97%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(3n) {\n width: 96%;\n height: 1.5rem;\n margin-bottom: 1.5rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(4n) {\n width: 72%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n.AuthWrapper-module_bar__1dafn.AuthWrapper-module_bar__1dafn:nth-child(5n) {\n width: 88%;\n height: 1.5rem;\n margin-bottom: 0.25rem;\n}\n\n.AuthWrapper-module_iframe__2wDJW {\n border: none;\n width: 100%;\n height: 1900px;\n}";
|
|
2823
|
+
var styles = { "loginBox": "AuthWrapper-module_loginBox__3l-BE", "loginBox_title": "AuthWrapper-module_loginBox_title__12rGD", "bar": "AuthWrapper-module_bar__1dafn", "iframe": "AuthWrapper-module_iframe__2wDJW" };
|
|
2824
2824
|
styleInject(css);
|
|
2825
2825
|
|
|
2826
2826
|
var AuthWrapper = function AuthWrapper(_ref) {
|
|
@@ -2865,73 +2865,57 @@ var AuthWrapper = function AuthWrapper(_ref) {
|
|
|
2865
2865
|
return React.createElement(
|
|
2866
2866
|
'div',
|
|
2867
2867
|
{ style: { position: 'relative', minHeight: '300px', paddingTop: '2rem' } },
|
|
2868
|
-
React.createElement(
|
|
2869
|
-
'div',
|
|
2870
|
-
{ style: { display: 'flex' } },
|
|
2871
|
-
React.createElement(
|
|
2872
|
-
'div',
|
|
2873
|
-
null,
|
|
2874
|
-
React.createElement(Skeleton, { reactangle: true, height: 120, width: 120 })
|
|
2875
|
-
),
|
|
2876
|
-
React.createElement(
|
|
2877
|
-
'div',
|
|
2878
|
-
{ style: { maxWidth: '76%', minWidth: '76%', marginLeft: '2rem' } },
|
|
2879
|
-
React.createElement(Skeleton, { count: 4 })
|
|
2880
|
-
)
|
|
2881
|
-
),
|
|
2882
|
-
React.createElement('br', null),
|
|
2883
|
-
React.createElement(Skeleton, { count: 8 }),
|
|
2884
2868
|
callbackUrl && React.createElement(
|
|
2885
2869
|
'div',
|
|
2886
|
-
|
|
2870
|
+
null,
|
|
2887
2871
|
React.createElement(
|
|
2888
2872
|
'div',
|
|
2889
|
-
{ className: styles.
|
|
2873
|
+
{ className: styles.loginBox },
|
|
2890
2874
|
React.createElement(
|
|
2891
|
-
'
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
{ onSubmit: function onSubmit(e) {
|
|
2899
|
-
return e.preventDefault();
|
|
2900
|
-
} },
|
|
2901
|
-
React.createElement(
|
|
2902
|
-
Form.Group,
|
|
2903
|
-
{ controlId: 'email' },
|
|
2904
|
-
React.createElement(Form.Control, { type: 'email', onChange: function onChange(e) {
|
|
2905
|
-
return setEmail(e.target.value);
|
|
2906
|
-
}, placeholder: 'Email' })
|
|
2875
|
+
'div',
|
|
2876
|
+
{ className: styles.loginBox_title },
|
|
2877
|
+
React.createElement(
|
|
2878
|
+
'b',
|
|
2879
|
+
null,
|
|
2880
|
+
'Please log in to view this content.'
|
|
2881
|
+
)
|
|
2907
2882
|
),
|
|
2908
2883
|
React.createElement(
|
|
2909
|
-
Form
|
|
2910
|
-
{
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2884
|
+
Form,
|
|
2885
|
+
{ onSubmit: function onSubmit(e) {
|
|
2886
|
+
return e.preventDefault();
|
|
2887
|
+
} },
|
|
2888
|
+
React.createElement(
|
|
2889
|
+
Form.Group,
|
|
2890
|
+
{ controlId: 'email' },
|
|
2891
|
+
React.createElement(Form.Control, { type: 'email', onChange: function onChange(e) {
|
|
2892
|
+
return setEmail(e.target.value);
|
|
2893
|
+
}, placeholder: 'Email' })
|
|
2894
|
+
),
|
|
2895
|
+
React.createElement(
|
|
2896
|
+
Form.Group,
|
|
2897
|
+
{ controlId: 'password' },
|
|
2898
|
+
React.createElement(Form.Control, { type: 'password', onChange: function onChange(e) {
|
|
2899
|
+
return setPassword(e.target.value);
|
|
2900
|
+
}, placeholder: 'Password' })
|
|
2901
|
+
),
|
|
2902
|
+
React.createElement(
|
|
2903
|
+
'button',
|
|
2904
|
+
{ className: 'btn btn-primary btn-block', onClick: function onClick() {
|
|
2905
|
+
return client.signIn('credentials', { email: email, password: password, callbackUrl: callbackUrl });
|
|
2906
|
+
} },
|
|
2907
|
+
'Sign in'
|
|
2908
|
+
)
|
|
2914
2909
|
),
|
|
2915
2910
|
React.createElement(
|
|
2916
|
-
'
|
|
2917
|
-
{ className: '
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
'
|
|
2911
|
+
'p',
|
|
2912
|
+
{ className: 'mt-2 mb-0' },
|
|
2913
|
+
'Don\'t have an account?',
|
|
2914
|
+
' ',
|
|
2915
|
+
'Please register below.'
|
|
2921
2916
|
)
|
|
2922
2917
|
),
|
|
2923
|
-
React.createElement(
|
|
2924
|
-
'p',
|
|
2925
|
-
{ className: 'mt-2 mb-0' },
|
|
2926
|
-
'Don\'t have an account?',
|
|
2927
|
-
' ',
|
|
2928
|
-
React.createElement(
|
|
2929
|
-
'a',
|
|
2930
|
-
{ style: { color: 'blue', textDecoration: 'underline' }, href: formUrl, target: '_blank', rel: 'noopener' },
|
|
2931
|
-
'Register here'
|
|
2932
|
-
),
|
|
2933
|
-
'.'
|
|
2934
|
-
)
|
|
2918
|
+
React.createElement('iframe', { className: styles.iframe, src: formUrl })
|
|
2935
2919
|
)
|
|
2936
2920
|
);
|
|
2937
2921
|
} else {
|
package/dist/esm/faundadb.js
CHANGED
|
@@ -173,23 +173,21 @@ var authenticateUser = function () {
|
|
|
173
173
|
|
|
174
174
|
case 8:
|
|
175
175
|
isAuth = _context3.sent;
|
|
176
|
-
|
|
177
|
-
console.log(isAuth, password, hashedPassword);
|
|
178
176
|
return _context3.abrupt('return', isAuth ? { email: email } : false);
|
|
179
177
|
|
|
180
|
-
case
|
|
181
|
-
_context3.prev =
|
|
178
|
+
case 12:
|
|
179
|
+
_context3.prev = 12;
|
|
182
180
|
_context3.t0 = _context3['catch'](0);
|
|
183
181
|
|
|
184
182
|
console.log(_context3.t0);
|
|
185
183
|
return _context3.abrupt('return', false);
|
|
186
184
|
|
|
187
|
-
case
|
|
185
|
+
case 16:
|
|
188
186
|
case 'end':
|
|
189
187
|
return _context3.stop();
|
|
190
188
|
}
|
|
191
189
|
}
|
|
192
|
-
}, _callee3, this, [[0,
|
|
190
|
+
}, _callee3, this, [[0, 12]]);
|
|
193
191
|
}));
|
|
194
192
|
|
|
195
193
|
return function authenticateUser(_x3, _x4) {
|