{__("About")}
@@ -155,6 +165,18 @@ class HelpPage extends React.PureComponent {
{__("Installation ID")} |
{this.state.lbryId} |
+
+ {__("Access Token")} |
+
+ {this.state.accessTokenHidden &&
+ }
+ {!this.state.accessTokenHidden &&
+ this.props.accessToken}
+ |
+
: }
diff --git a/ui/js/reducers/user.js b/ui/js/reducers/user.js
index 4e4ffda40..ef7602193 100644
--- a/ui/js/reducers/user.js
+++ b/ui/js/reducers/user.js
@@ -120,6 +120,14 @@ reducers[types.USER_EMAIL_VERIFY_FAILURE] = function(state, action) {
});
};
+reducers[types.FETCH_ACCESS_TOKEN_SUCCESS] = function(state, action) {
+ const { token } = action.data;
+
+ return Object.assign({}, state, {
+ accessToken: token,
+ });
+};
+
export default function reducer(state = defaultState, action) {
const handler = reducers[action.type];
if (handler) return handler(state, action);
diff --git a/ui/js/selectors/user.js b/ui/js/selectors/user.js
index d17485aa6..265e9c936 100644
--- a/ui/js/selectors/user.js
+++ b/ui/js/selectors/user.js
@@ -76,3 +76,8 @@ export const selectUserIsAuthRequested = createSelector(
(isEmailDeclined, isPending, isVerificationCandidate, hasEmail) =>
!isEmailDeclined && (isPending || !hasEmail || isVerificationCandidate)
);
+
+export const selectAccessToken = createSelector(
+ _selectState,
+ state => state.accessToken
+);