feat(2FA): remove 2FA required modal - UOD-3895 - #760
Merged
Conversation
btech222
requested review from
denis-shtupa-unzer
and
a lite review from Copilot
August 17, 2026 17:03
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the v0 IamMeClass “reset 2FA for current user” action from the SDK and deletes the associated Jest tests.
Changes:
- Removed
IamMeClass.setup2faActionMe()andIamMeSetup2faActionFailedfromsrc/v0/iam_me.ts. - Deleted
test/iam_me/setup-2fa-action.test.tswhich covered the removed API.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/v0/iam_me.ts |
Removes the setup2faActionMe API method and its error class from the v0 iam-me handler. |
test/iam_me/setup-2fa-action.test.ts |
Deletes tests for the removed setup2faActionMe behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
2
to
6
| import { Client } from '../client' | ||
| import { BaseError } from '../errors/baseError' | ||
| import { UriHelper } from '../uri-helper' | ||
| import { ThBaseHandler } from '../base' | ||
| import { IamUser, IamUserResponse } from './iam_users' | ||
|
|
Comment on lines
74
to
78
| } catch (error: any) { | ||
| throw new IamMeFetchFailed(error.message, { error }) | ||
| } | ||
| } | ||
|
|
||
| async setup2faActionMe (tenantId: string): Promise<IamUserResponse> { | ||
| const base = this.options.base ?? 'https://api.tillhub.com' | ||
| const uri = `${base}${this.endpoint}/${tenantId}/reset-2fa` | ||
|
|
||
| try { | ||
| const response = await this.http.getClient().post(uri) | ||
|
|
||
| if (response.status !== 200) { | ||
| throw new IamMeSetup2faActionFailed(undefined, { status: response.status }) | ||
| } | ||
| return { | ||
| data: response.data.results[0] as IamUser, | ||
| msg: response.data.msg, | ||
| metadata: { count: response.data.count } | ||
| } | ||
| } catch (error: any) { | ||
| throw new IamMeSetup2faActionFailed(error.message, { error }) | ||
| } | ||
| } | ||
| } |
Comment on lines
75
to
78
| throw new IamMeFetchFailed(error.message, { error }) | ||
| } | ||
| } | ||
|
|
||
| async setup2faActionMe (tenantId: string): Promise<IamUserResponse> { | ||
| const base = this.options.base ?? 'https://api.tillhub.com' | ||
| const uri = `${base}${this.endpoint}/${tenantId}/reset-2fa` | ||
|
|
||
| try { | ||
| const response = await this.http.getClient().post(uri) | ||
|
|
||
| if (response.status !== 200) { | ||
| throw new IamMeSetup2faActionFailed(undefined, { status: response.status }) | ||
| } | ||
| return { | ||
| data: response.data.results[0] as IamUser, | ||
| msg: response.data.msg, | ||
| metadata: { count: response.data.count } | ||
| } | ||
| } catch (error: any) { | ||
| throw new IamMeSetup2faActionFailed(error.message, { error }) | ||
| } | ||
| } | ||
| } |
github-actions Bot
pushed a commit
that referenced
this pull request
Aug 18, 2026
# [4.288.0](v4.287.0...v4.288.0) (2026-08-18) ### Features * **2FA:** remove 2FA required modal - UOD-3895 ([#760](#760)) ([ae33793](ae33793))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.