{__("About")}
@@ -163,6 +173,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 4f78d3dc2..56720b2f7 100644
--- a/ui/js/reducers/user.js
+++ b/ui/js/reducers/user.js
@@ -142,6 +142,14 @@ reducers[types.USER_IDENTITY_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 55108d335..68554d825 100644
--- a/ui/js/selectors/user.js
+++ b/ui/js/selectors/user.js
@@ -68,3 +68,8 @@ export const selectUserIsVerificationCandidate = createSelector(
selectUser,
user => user && (!user.has_verified_email || !user.is_identity_verified)
);
+
+export const selectAccessToken = createSelector(
+ _selectState,
+ state => state.accessToken
+);