Skip to content

Commit

Permalink
Added extension page to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
kwelch-eb committed Nov 2, 2018
1 parent 4a87736 commit c06cdf2
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"dependencies": {
"eventbrite": "^1.0.2",
"eventbrite_design_system": "http://packages.evbops.com:8889/package/eventbrite_design_system/66.13.0",
"jsonwebtoken": "^8.3.0",
"lodash": "^4.17.11",
"query-string": "^6.2.0",
"react": "15.4.2",
Expand Down
3 changes: 2 additions & 1 deletion src/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { BrowserRouter as Router, Route } from 'react-router-dom';
import { RegisterPage, HomePage } from './pages';
import { RegisterPage, HomePage, ExtensionPage } from './pages';
import(/* webpackPreload: true */'eventbrite_design_system/css/eds.css');

export default class App extends Component {
Expand All @@ -9,6 +9,7 @@ export default class App extends Component {
<Router>
<div className="App">
<Route path="/register" component={RegisterPage} />
<Route path="/extension" component={ExtensionPage} />
<Route exact path="/" component={HomePage} />
</div>
</Router>
Expand Down
23 changes: 23 additions & 0 deletions src/pages/ExtensionPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react';
import {parse} from 'query-string';
import jwt from 'jsonwebtoken';
import {CLIENT_SECRET} from '../constants';

export default class ExtensionPage extends React.PureComponent {
constructor(props) {
super(props);
const query = parse(props.location.search);
this.state = {
token: query.esr ? jwt.decode(query.esr, CLIENT_SECRET): null,
}
}

render() {
return (
<div>
<h1>Token details</h1>
<code>{JSON.stringify(this.state.token)}</code>
</div>
);
}
}
2 changes: 1 addition & 1 deletion src/pages/RegisterPage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import request from 'request';
import querystring from 'querystring';
import querystring from 'query-string';
import { CLIENT_ID, CLIENT_SECRET, BASE_URL } from '../constants';

export default class Register extends Component {
Expand Down
1 change: 1 addition & 0 deletions src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { default as HomePage } from './HomePage';
export { default as RegisterPage } from './RegisterPage';
export { default as ExtensionPage } from './ExtensionPage';
59 changes: 59 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1837,6 +1837,10 @@ buffer-crc32@^0.2.1:
version "0.2.13"
resolved "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"

[email protected]:
version "1.0.1"
resolved "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"

buffer-fill@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c"
Expand Down Expand Up @@ -3053,6 +3057,12 @@ ecc-jsbn@~0.1.1:
jsbn "~0.1.0"
safer-buffer "^2.1.0"

[email protected]:
version "1.0.10"
resolved "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.10.tgz#1c595000f04a8897dfb85000892a0f4c33af86c3"
dependencies:
safe-buffer "^5.0.1"

[email protected]:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
Expand Down Expand Up @@ -5527,6 +5537,20 @@ jsonify@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73"

jsonwebtoken@^8.3.0:
version "8.3.0"
resolved "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.3.0.tgz#056c90eee9a65ed6e6c72ddb0a1d325109aaf643"
dependencies:
jws "^3.1.5"
lodash.includes "^4.3.0"
lodash.isboolean "^3.0.3"
lodash.isinteger "^4.0.4"
lodash.isnumber "^3.0.3"
lodash.isplainobject "^4.0.6"
lodash.isstring "^4.0.1"
lodash.once "^4.0.0"
ms "^2.1.1"

jsprim@^1.2.2:
version "1.4.1"
resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
Expand All @@ -5542,6 +5566,21 @@ jsx-ast-utils@^2.0.1:
dependencies:
array-includes "^3.0.3"

jwa@^1.1.5:
version "1.1.6"
resolved "https://registry.npmjs.org/jwa/-/jwa-1.1.6.tgz#87240e76c9808dbde18783cf2264ef4929ee50e6"
dependencies:
buffer-equal-constant-time "1.0.1"
ecdsa-sig-formatter "1.0.10"
safe-buffer "^5.0.1"

jws@^3.1.5:
version "3.1.5"
resolved "https://registry.npmjs.org/jws/-/jws-3.1.5.tgz#80d12d05b293d1e841e7cb8b4e69e561adcf834f"
dependencies:
jwa "^1.1.5"
safe-buffer "^5.0.1"

killable@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892"
Expand Down Expand Up @@ -5714,6 +5753,10 @@ lodash.get@^4.4.2:
version "4.4.2"
resolved "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"

lodash.includes@^4.3.0:
version "4.3.0"
resolved "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz#60bb98a87cb923c68ca1e51325483314849f553f"

lodash.isboolean@^3.0.3:
version "3.0.3"
resolved "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz#6c2e171db2a257cd96802fd43b01b20d5f5870f6"
Expand All @@ -5726,6 +5769,14 @@ lodash.isequal@^4.5.0:
version "4.5.0"
resolved "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"

lodash.isinteger@^4.0.4:
version "4.0.4"
resolved "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz#619c0af3d03f8b04c31f5882840b77b11cd68343"

lodash.isnumber@^3.0.3:
version "3.0.3"
resolved "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz#3ce76810c5928d03352301ac287317f11c0b1ffc"

lodash.isobject@^3.0.2:
version "3.0.2"
resolved "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz#3c8fb8d5b5bf4bf90ae06e14f2a530a4ed935e1d"
Expand All @@ -5734,6 +5785,10 @@ lodash.isplainobject@^4.0.6:
version "4.0.6"
resolved "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"

lodash.isstring@^4.0.1:
version "4.0.1"
resolved "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451"

lodash.memoize@^4.1.2:
version "4.1.2"
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
Expand All @@ -5746,6 +5801,10 @@ lodash.mergewith@^4.6.1:
version "4.6.1"
resolved "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927"

lodash.once@^4.0.0:
version "4.1.1"
resolved "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac"

lodash.set@^4.3.2:
version "4.3.2"
resolved "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23"
Expand Down

0 comments on commit c06cdf2

Please sign in to comment.