Skip to content

Commit

Permalink
Fix user invite
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-kovoy committed Oct 8, 2019
1 parent 676873b commit c1d01a0
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 45 deletions.
2 changes: 1 addition & 1 deletion web/packages/e
Submodule e updated from 550267 to 438fb8

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/packages/teleport/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
</head>
<body>
<div id="app"></div>
<script type="text/javascript" src="/web/app/vendor.b129b25312596d78d328.js"></script><script type="text/javascript" src="/web/app/app.9e376ad98d837d9ae4e7.js"></script></body>
<script type="text/javascript" src="/web/app/vendor.b129b25312596d78d328.js"></script><script type="text/javascript" src="/web/app/app.083c17f0d83047ee422b.js"></script></body>
</html>
6 changes: 5 additions & 1 deletion web/packages/teleport/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const cfg = {
sessionPath: '/v1/webapi/sessions',
userContextPath: '/v1/webapi/sites/:clusterId/context',
userStatusPath: '/v1/webapi/user/status',
invitePath: '/v1/webapi/users/invites/:inviteToken',
invitePath: '/v1/webapi/users/invites/:token',
userTokenInviteDonePath: '/v1/webapi/users',
changeUserPasswordPath: '/v1/webapi/users/password',
u2fCreateUserChallengePath: '/v1/webapi/u2f/signuptokens/:inviteToken',
Expand Down Expand Up @@ -137,6 +137,10 @@ const cfg = {
});
},

getInviteUrl(token) {
return generatePath(cfg.api.invitePath, { token });
},

getClusterRoute(clusterId) {
clusterId = clusterId || cfg.clusterName;
return generatePath(cfg.routes.cluster, { clusterId });
Expand Down
2 changes: 1 addition & 1 deletion web/packages/teleport/src/services/auth/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import makeUserToken from './makeUserToken';

const auth = {
fetchToken(tokenId) {
const path = cfg.api.getInviteUrl(tokenId);
const path = cfg.getInviteUrl(tokenId);
return api.get(path).then(json => {
return makeUserToken(json);
});
Expand Down

0 comments on commit c1d01a0

Please sign in to comment.