Skip to content
This repository was archived by the owner on Feb 8, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/teleport/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ const cfg = {
checkAccessToRegisteredResource: `/v1/webapi/sites/:clusterId/resources/check`,

scp: '/v1/webapi/sites/:clusterId/nodes/:serverId/:login/scp?location=:location&filename=:filename',
renewTokenPath: '/v1/webapi/sessions/renew',
webRenewTokenPath: '/v1/webapi/sessions/web/renew',
resetPasswordTokenPath: '/v1/webapi/users/password/token',
sessionPath: '/v1/webapi/sessions',
webSessionPath: '/v1/webapi/sessions/web',
userContextPath: '/v1/webapi/sites/:clusterId/context',
userStatusPath: '/v1/webapi/user/status',
passwordTokenPath: '/v1/webapi/users/password/token/:tokenId?',
Expand Down Expand Up @@ -458,7 +458,7 @@ const cfg = {
},

getRenewTokenUrl() {
return cfg.api.renewTokenPath;
return cfg.api.webRenewTokenPath;
},

getGithubConnectorsUrl(name?: string) {
Expand Down
4 changes: 2 additions & 2 deletions packages/teleport/src/services/auth/auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('services/auth', () => {
jest.spyOn(api, 'post').mockResolvedValue({});

await auth.login(email, password, '');
expect(api.post).toHaveBeenCalledWith(cfg.api.sessionPath, {
expect(api.post).toHaveBeenCalledWith(cfg.api.webSessionPath, {
user: email,
pass: password,
second_factor_token: '',
Expand All @@ -49,7 +49,7 @@ describe('services/auth', () => {
};

await auth.login(email, password, 'xxx');
expect(api.post).toHaveBeenCalledWith(cfg.api.sessionPath, data);
expect(api.post).toHaveBeenCalledWith(cfg.api.webSessionPath, data);
});

test('resetPassword()', async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/teleport/src/services/auth/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const auth = {
second_factor_token: otpCode,
};

return api.post(cfg.api.sessionPath, data);
return api.post(cfg.api.webSessionPath, data);
},

loginWithWebauthn(creds?: UserCredentials) {
Expand Down
2 changes: 1 addition & 1 deletion packages/teleport/src/services/websession/websession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ let sesstionCheckerTimerId = null;

const session = {
logout() {
api.delete(cfg.api.sessionPath).finally(() => {
api.delete(cfg.api.webSessionPath).finally(() => {
history.goToLogin();
});

Expand Down