Skip to content

Commit c470ba7

Browse files
committed
basic login with FB using signin widget
1 parent d3c2b25 commit c470ba7

File tree

10 files changed

+14452
-11450
lines changed

10 files changed

+14452
-11450
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,5 @@ fabric.properties
8282
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
8383
hs_err_pid*
8484

85+
.eslintcache
86+
.DS_Store

README.md

Lines changed: 2 additions & 2443 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 14345 additions & 8957 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 43 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,50 @@
11
{
2-
"name": "splitnot-ui",
3-
"version": "0.1.0",
2+
"name": "samples-js-react",
3+
"version": "0.2.0",
44
"private": true,
55
"dependencies": {
6-
"react": "^16.4.1",
7-
"react-dom": "^16.4.1",
8-
"react-scripts": "1.1.4"
6+
"@okta/okta-auth-js": "^4.2.0",
7+
"@okta/okta-react": "^4.0.0",
8+
"@okta/okta-signin-widget": "^5.0.0",
9+
"colors": "^1.1.2",
10+
"cross-env": "^5.1.3",
11+
"dotenv": "^8.1.0",
12+
"eslint-config-airbnb": "^18.2.1",
13+
"jquery": "^3.4.1",
14+
"react": "^16.8.0",
15+
"react-dom": "^16.8.0",
16+
"react-router-dom": "^5.0.0",
17+
"react-scripts": "^4.0.0",
18+
"semantic-ui-css": "^2.2.12",
19+
"semantic-ui-react": "^2.0.1",
20+
"text-encoding": "^0.7.0"
921
},
1022
"scripts": {
11-
"start": "react-scripts start",
12-
"build": "react-scripts build",
13-
"test": "react-scripts test --env=jsdom",
23+
"start": "cross-env PORT=8080 react-app-rewired start",
24+
"build": "react-app-rewired build",
25+
"test": "react-scripts test --watchAll=false",
1426
"eject": "react-scripts eject"
27+
},
28+
"devDependencies": {
29+
"h": "^1.0.0",
30+
"react-app-rewired": "^2.1.6",
31+
"source-map-loader": "^1.1.0"
32+
},
33+
"browserslist": {
34+
"production": [
35+
">0.2%",
36+
"not dead",
37+
"not op_mini all"
38+
],
39+
"development": [
40+
"last 1 chrome version",
41+
"last 1 firefox version",
42+
"last 1 safari version"
43+
]
44+
},
45+
"jest": {
46+
"moduleNameMapper": {
47+
"^@okta/okta-auth-js$": "<rootDir>/node_modules/@okta/okta-auth-js/dist/okta-auth-js.umd.js"
48+
}
1549
}
16-
}
50+
}

src/App.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2018, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
12+
113
.App {
214
text-align: center;
315
}

src/App.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/App.test.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/index.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/*
2+
* Copyright (c) 2018, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
12+
113
body {
214
margin: 0;
315
padding: 0;

src/index.js

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,29 @@
1+
/*
2+
* Copyright (c) 2018, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
12+
113
import React from 'react';
214
import ReactDOM from 'react-dom';
3-
import './index.css';
15+
import { BrowserRouter as Router } from 'react-router-dom';
16+
import 'semantic-ui-css/semantic.min.css';
17+
import './polyfills';
418
import App from './App';
19+
import './index.css';
520
import registerServiceWorker from './registerServiceWorker';
621

7-
ReactDOM.render(<App />, document.getElementById('root'));
22+
/* eslint-disable react/jsx-filename-extension */
23+
ReactDOM.render(
24+
<Router>
25+
<App />
26+
</Router>,
27+
document.getElementById('root'),
28+
);
829
registerServiceWorker();

src/registerServiceWorker.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/*
2+
* Copyright (c) 2018, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
12+
13+
/* eslint-disable */
114
// In production, we register a service worker to serve assets from local cache.
215

316
// This lets the app load faster on subsequent visits in production, and gives
@@ -35,15 +48,6 @@ export default function register() {
3548
if (isLocalhost) {
3649
// This is running on localhost. Lets check if a service worker still exists or not.
3750
checkValidServiceWorker(swUrl);
38-
39-
// Add some additional logging to localhost, pointing developers to the
40-
// service worker/PWA documentation.
41-
navigator.serviceWorker.ready.then(() => {
42-
console.log(
43-
'This web app is being served cache-first by a service ' +
44-
'worker. To learn more, visit https://goo.gl/SC7cgQ'
45-
);
46-
});
4751
} else {
4852
// Is not local host. Just register service worker
4953
registerValidSW(swUrl);

0 commit comments

Comments
 (0)