Commit Graph

399 Commits

Author SHA1 Message Date
Michael Bradley, Jr 8a9b8f25ab separate "should authenticate" logic from "do authenticate" logic
but don't maintain separate methods for query string vs. props
2018-10-25 05:50:59 -05:00
Michael Bradley, Jr a5c972903b formatting 2018-10-25 05:50:58 -05:00
Michael Bradley, Jr 10fa3fec9f consolidate DEFAULT_HOST logic 2018-10-25 05:50:58 -05:00
Michael Bradley, Jr 9533b57627 formatting 2018-10-25 05:50:58 -05:00
Michael Bradley, Jr d861b0b1af prefer an empty React Fragment to an empty div 2018-10-25 05:50:58 -05:00
Michael Bradley, Jr 56177346df set error null for action.type AUTHENTICATE[REQUEST] 2018-10-25 05:50:53 -05:00
Michael Bradley, Jr d150deb572 error is `null` in DEFAULT_CREDENTIALS_STATE 2018-10-25 05:50:53 -05:00
Michael Bradley, Jr 9ce967ca03 prefer `import` to `require()` 2018-10-25 05:50:53 -05:00
Michael Bradley, Jr 754266da17 formatting 2018-10-25 05:50:53 -05:00
Michael Bradley, Jr a594b14f27 combine token stripping logic, use utils 2018-10-25 05:50:53 -05:00
Michael Bradley, Jr 53d6b9d704 reorg getQueryToken, stripQueryToken in utils/utils 2018-10-25 05:50:53 -05:00
Michael Bradley, Jr 8d684bf1ef make requireAuthentication clearer
if authenticating or authenticated, do not require authentication
2018-10-25 05:50:53 -05:00
Michael Bradley, Jr 8add299f53 whitespace 2018-10-25 05:50:53 -05:00
Michael Bradley, Jr 8b23d012eb don't return Layout while authenticating 2018-10-25 05:50:53 -05:00
Michael Bradley, Jr 2088624d83 on autho failure trigger logout, which clears localStorage
We don't presently have a way to cleanly distinguish between auth attempts with
query string vs. credentials from localStorage, particularly with respect to
one kind failing vs. the other. This can create confusing behavior when
e.g. copy/pasting an old/wrong URL+token, but then it works when refreshing the
window/tab with URL minus the token.

So, this commit simplifies the situation somewhat by triggering a logout
if there's an auth failure. That will affect all open tabs/windows of the
same browser but not other browsers, e.g. if one has embark-ui open in Chrome
and Firefox.
2018-10-25 05:50:53 -05:00
Michael Bradley, Jr 0ce26e4479 include default credentials state on auth failure 2018-10-25 05:50:53 -05:00
Michael Bradley, Jr 8d40c04107 strip token from URL if auth fails 2018-10-25 05:50:53 -05:00
Michael Bradley, Jr d02d2f1522 make token stripping logic reusable 2018-10-25 05:50:53 -05:00
Michael Bradley, Jr 3071c489a7 introduce props.credentials.authenticating
helps prevent auth dupes and allows "flash" of Login component to be avoided
while waiting for an authentication attempt that may succeed
2018-10-25 05:50:52 -05:00
Michael Bradley, Jr ee13fcf3ad getToken -> getQueryToken 2018-10-25 05:50:52 -05:00
Michael Bradley, Jr 2abcfe5de0 remove token from URL and replace location in history if auth'd 2018-10-25 05:50:52 -05:00
Michael Bradley, Jr 1b20bbbeb8 invoke queryStringAuthenticate before requireAuthentication 2018-10-25 05:50:52 -05:00
Michael Bradley, Jr 2432489943 remove useless constructor 2018-10-25 05:50:52 -05:00
Michael Bradley, Jr fe1a0a6f3b only auth w/ stored token if there is no query string token 2018-10-25 05:50:52 -05:00
Iuri Matias 4b00145e4b
Merge pull request #160 from status-im/feature/file-tree-icons
Add icons to file tree
2018-10-25 06:13:25 -04:00
Iuri Matias 21fd3292b8
Merge pull request #161 from status-im/chores/warning
Fix warnings
2018-10-25 06:11:00 -04:00
Iuri Matias 767b81da63
Merge pull request #162 from status-im/feature/add-contracts-overview-to-deployment
Add function to contract deployment
2018-10-25 06:10:44 -04:00
Anthony Laibe df86bae377 Remove footer 2018-10-25 10:43:26 +01:00
Anthony Laibe 7e1a6848ae Add function to contract deployment 2018-10-25 09:43:50 +01:00
Anthony Laibe 48715efec8 Fix warnings 2018-10-25 08:23:09 +01:00
Anthony Laibe 8ae6c6c154 Add icons to file tree 2018-10-25 08:06:37 +01:00
Iuri Matias 2821c3deb1 improve sidebars width 2018-10-24 17:20:36 -04:00
Iuri Matias 886b78f497
Merge pull request #158 from status-im/feature/move-contracts-page-to-explorer
Move contracts to explorer
2018-10-24 17:13:37 -04:00
Iuri Matias 90c033187d
Merge pull request #156 from status-im/features/explorer-pagination
Add pagination to explorer
2018-10-24 17:13:16 -04:00
Jonathan Rainville 60c07072cf review comments 2018-10-24 16:41:05 -04:00
Andre Medeiros d02edf869b Move contracts to explorer 2018-10-24 16:03:46 -04:00
Jonathan Rainville d8145e80b1 fix tabs 2018-10-24 16:03:40 -04:00
Jonathan Rainville e268c5b8c8 remove hard-coded color 2018-10-24 15:23:31 -04:00
Jonathan Rainville c50390fb01 fix dark-theme layout 2018-10-24 15:20:31 -04:00
Jonathan Rainville 90fafd0158 fix linting on the explorer 2018-10-24 15:09:32 -04:00
Jonathan Rainville 3d3ce559e9 add pagination to transactions too 2018-10-24 14:51:09 -04:00
Jonathan Rainville ab3fa97592 change page when clicking on it for blocks 2018-10-24 14:51:09 -04:00
Jonathan Rainville 8bdc8d41d4 start pagination at the end 2018-10-24 14:51:09 -04:00
Jonathan Rainville a1b18b74f8 conflict in css 2018-10-24 14:50:07 -04:00
Jonathan Rainville 6c92e7b24d display correct pagination whatever the page 2018-10-24 14:48:48 -04:00
Jonathan Rainville 09e21f3386 conflict in layout 2018-10-24 14:48:48 -04:00
Jonathan Rainville 78e9d3257d conflict in explorer 2018-10-24 14:48:48 -04:00
André Medeiros 5fd69b60fa
Merge branch 'develop_51' into restyle-code-editor-top-bar 2018-10-24 14:14:59 -04:00
Iuri Matias 7175bc506c
Merge pull request #153 from status-im/restyle-explorer
Restyle explorer
2018-10-24 14:13:11 -04:00
Iuri Matias 8e6272d75f fix merge conflict 2018-10-24 14:11:24 -04:00