Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
38 changes: 0 additions & 38 deletions packages/fxa-auth-client/lib/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2625,35 +2625,6 @@ export default class AuthClient {
);
}

async sendLoginPushRequest(
sessionToken: hexstring,
headers?: Headers
): Promise<void> {
return this.sessionPost(
'/session/verify/send_push',
sessionToken,
{},
headers
);
}

async verifyLoginPushRequest(
sessionToken: hexstring,
tokenVerificationId: string,
code: string,
headers?: Headers
): Promise<void> {
return this.sessionPost(
'/session/verify/verify_push',
sessionToken,
{
tokenVerificationId,
code,
},
headers
);
}

async verifyTotpCode(
sessionToken: hexstring,
code: string,
Expand Down Expand Up @@ -3144,15 +3115,6 @@ export default class AuthClient {
);
}

async sendPushLoginRequest(sessionToken: string, headers?: Headers) {
return this.sessionPost(
'/session/verify/send_push',
sessionToken,
{},
headers
);
}

/**
* Tries to register a recovery phone number. Important, this must be used for inline_recovery flow!
*
Expand Down
1 change: 0 additions & 1 deletion packages/fxa-auth-server/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2928,7 +2928,6 @@ convictConf.set(
'https://support.mozilla.org/kb/secure-mozilla-account-two-step-authentication'
);
convictConf.set('smtp.verificationUrl', `${baseUri}/verify_email`);
convictConf.set('smtp.pushVerificationUrl', `${baseUri}/push/confirm_login`);
convictConf.set('smtp.passwordResetUrl', `${baseUri}/complete_reset_password`);
convictConf.set('smtp.initiatePasswordResetUrl', `${baseUri}/reset_password`);
convictConf.set(
Expand Down
26 changes: 0 additions & 26 deletions packages/fxa-auth-server/docs/swagger/session-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,39 +130,13 @@ const SESSION_RESEND_CODE_POST = {
notes: ['🔒 Authenticated with session token'],
};

const SESSION_SEND_PUSH_POST = {
...TAGS_SESSION,
description: '/session/verify/send_push',
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally I would say lets return for 501 (not implemented) or some similar code, but not clients have ever used this endpoint so fair to completely remove.

notes: [
dedent`
🔒 Authenticated with session token

Sends a push notification to all push enabled devices to verify current session.
`,
],
};

const SESSION_VERIFY_PUSH_POST = {
...TAGS_SESSION,
description: '/session/verify/verify_push',
notes: [
dedent`
🔒 Authenticated with session token

Endpoint that accepts a code and tokenVerificationId to verify a session.
`,
],
};

const API_DOCS = {
SESSION_DESTROY_POST,
SESSION_DUPLICATE_POST,
SESSION_REAUTH_POST,
SESSION_STATUS_GET,
SESSION_RESEND_CODE_POST,
SESSION_VERIFY_CODE_POST,
SESSION_SEND_PUSH_POST,
SESSION_VERIFY_PUSH_POST,
};

export default API_DOCS;
3 changes: 0 additions & 3 deletions packages/fxa-auth-server/lib/l10n/server.ftl
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
## Non-email strings

session-verify-send-push-title-2 = Logging in to your { -product-mozilla-account }?
session-verify-send-push-body-2 = Click here to confirm it’s you
# Message sent by SMS with limited character length, please test translation with the messaging segment calculator
# https://twiliodeved.github.io/message-segment-calculator/
# Messages should be limited to one segment
Expand Down
21 changes: 0 additions & 21 deletions packages/fxa-auth-server/lib/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const PUSH_COMMANDS = {
PASSWORD_RESET: 'fxaccounts:password_reset',
ACCOUNT_DESTROYED: 'fxaccounts:account_destroyed',
COMMAND_RECEIVED: 'fxaccounts:command_received',
LOGIN_REQUEST: 'fxaccounts:verify_login',
};

const PUSH_REASONS = new Set([
Expand All @@ -31,7 +30,6 @@ const PUSH_REASONS = new Set([
'devicesNotify',
'accountDestroyed',
'commandReceived',
'verifyLogin',
]);

const PUSH_ERRORS = new Set([
Expand Down Expand Up @@ -347,25 +345,6 @@ module.exports = function (log, db, config, statsd) {
});
},

/**
* Notify a device to verify a login request. The push notification
* contains location, UA and verification code in the url.
*
* @param {String} uid
* @param {Device[]} devices
* @param {Object} data
* @promise
*/
notifyVerifyLoginRequest(uid, devices, data) {
return this.sendPush(uid, devices, 'verifyLogin', {
data: {
version: PUSH_PAYLOAD_SCHEMA_VERSION,
command: PUSH_COMMANDS.LOGIN_REQUEST,
data,
},
});
},

/**
* Send a push notification with or without data to a list of devices
*
Expand Down
Loading
Loading