Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: Account linking #670

Merged
merged 85 commits into from
Sep 20, 2023
Merged

feat!: Account linking #670

merged 85 commits into from
Sep 20, 2023

Conversation

porcellus
Copy link
Collaborator

@porcellus porcellus commented Aug 8, 2023

Summary of change

Account linking

Related issues

  • Link to issue1 here
  • Link to issue1 here

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos!)

Documentation changes

(If relevant, please create a PR in our docs repo, or create a checklist here highlighting the necessary changes)

Checklist for important updates

  • Changelog has been updated
  • coreDriverInterfaceSupported.json file has been updated (if needed)
    • Along with the associated array in lib/ts/version.ts
  • frontendDriverInterfaceSupported.json file has been updated (if needed)
  • Changes to the version if needed
    • In package.json
    • In package-lock.json
    • In lib/ts/version.ts
  • Had run npm run build-pretty
  • Had installed and ran the pre-commit hook
  • If new thirdparty provider is added,
    • update switch statement in recipe/thirdparty/providers/configUtils.ts file, createProvider function.
    • add an icon on the user management dashboard.
  • Issue this PR against the latest non released version branch.
    • To know which one it is, run find the latest released tag (git tag) in the format vX.Y.Z, and then find the latest branch (git branch --all) whose X.Y is greater than the latest released tag.
    • If no such branch exists, then create one from the latest released branch.
  • If have added a new web framework, update the add-ts-no-check.js file to include that
  • If added a new recipe / api interface, then make sure that the implementation of it uses NON arrow functions only (like someFunc: function () {..}).
  • If added a new recipe, then make sure to expose it inside the recipe folder present in the root of this repo. We also need to expose its types.

Remaining TODOs for this PR

  • Item1
  • Item2

Summary by CodeRabbit

Release Notes:

  • Refactor: Updated createAndSendEmailUsingSupertokensService function in passwordResetFunctions.js to use async/await syntax and added log messages for success and error scenarios.
  • Refactor: Removed the import of User type in passwordResetFunctions.d.ts and replaced it with an inline type definition.
  • Refactor: In recipe.d.ts, updated the import statements for BaseRequest and BaseResponse to use the type keyword and removed the getEmailForUserId property from the class.

🐇 "Hoppity hop, code doesn't stop,
With every refactor, we rise to the top.
Async-await now in place,
Logging errors just in case.
Type imports are neat and clean,
Making our codebase a well-oiled machine. 🎉"

bhumilsarvaiya and others added 30 commits November 23, 2022 12:09
* account linking changes

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/session/sessionClass.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/session/sessionFunctions.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* code review changes

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* code review changes

* code review changes

* code review changes

* code review changes

* code review changes

* Update lib/ts/recipe/session/sessionFunctions.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

Co-authored-by: Rishabh Poddar <[email protected]>
* EP recipe interface changes regarding account-linking

* Update lib/ts/recipe/emailpassword/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/emailpassword/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/emailpassword/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* Update lib/ts/recipe/emailpassword/api/implementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/emailpassword/api/implementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/emailpassword/api/implementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/emailpassword/api/implementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/emailpassword/api/implementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/emailpassword/api/implementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* Update lib/ts/recipe/emailpassword/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/thirdpartyemailpassword/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

Co-authored-by: Rishabh Poddar <[email protected]>
* thirdparty interface changes regarding account-linking

* Update lib/ts/recipe/thirdparty/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* code review changes

Co-authored-by: Rishabh Poddar <[email protected]>
* passwordless interface changes for account linking

* code review changes
* recipe interface changes for account linking

* user context update

* types update

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

Co-authored-by: Rishabh Poddar <[email protected]>
* recipe interface changes for account linking

* account linking implementation

* user context update

* code udpate

* types update

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* return type update

* index file updated

* merge with account-linking interface

* Update lib/ts/recipe/accountlinking/recipeImplementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* Update lib/ts/recipe/accountlinking/recipeImplementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* code review changes

* code review changes

* code review changes

* review changes

* recipeImplementation types update

* merge with 13.0

* recipe implementation update

* changes to dashboard recipe types

* removes unnecessary functions exposed from account linking recipe

* adds a precautionary check

* small change

* Update lib/ts/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/index.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/supertokens.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/dashboard/api/usersGet.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/index.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/index.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/index.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* mark email as verify if it is already verified in either primary user or the current recipe user

* fixes and refactors

* account linking: fixes bugs and refactors (#498)

* fixes bugs and refactors

* small refactors and fixes

* small refactor

* small type changes

* review changes

* removes redundant check

* account linking: removes ANOTHER from canCreatePrimaryUserId status return type (#500)

* removes ANOTHER from canCreatePrimaryUserId status return type

* small change related to status change in primary user id creation

* change to canLinkAccounts

* Update lib/ts/recipe/accountlinking/recipeImplementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipeImplementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

---------

Co-authored-by: Rishabh Poddar <[email protected]>
* Refactor status

* Refactor unlink accounts return type

* Move marking emails as verified logic to link accounts

* Refactor

* Rename ACCOUNT_INFO_ALREADY_LINKED_WITH_ANOTHER_PRIMARY_USER_ID_ERROR

* fixes review comments

---------

Co-authored-by: rishabhpoddar <[email protected]>
* recipe interface changes for account linking

* account linking implementation

* user context update

* code udpate

* types update

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* return type update

* index file updated

* merge with account-linking interface

* Update lib/ts/recipe/accountlinking/recipeImplementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* Update lib/ts/recipe/accountlinking/recipeImplementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* code review changes

* code review changes

* code review changes

* review changes

* sign-up post login updated

* sign-up post login updated

* sign-up API implementation update

* import update

* function import update

* changes in signup recipeimplementation

* recipeImplementation types update

* merge with 13.0

* merge with account-linking implementation

* recipe implementation update

* account linking claim

* changes to dashboard recipe types

* removes unnecessary functions exposed from account linking recipe

* adds a precautionary check

* small change

* Update lib/ts/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/index.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/supertokens.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/dashboard/api/usersGet.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/index.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/index.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/index.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* mark email as verify if it is already verified in either primary user or the current recipe user

* fixes and refactors

* account linking: fixes bugs and refactors (#498)

* fixes bugs and refactors

* small refactors and fixes

* small refactor

* small type changes

* review changes

* removes redundant check

* account linking: removes ANOTHER from canCreatePrimaryUserId status return type (#500)

* removes ANOTHER from canCreatePrimaryUserId status return type

* small change related to status change in primary user id creation

* change to canLinkAccounts

* Update lib/ts/recipe/accountlinking/recipeImplementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipeImplementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* review changes

* createdNewUser changes

* adds comments

* fixes

* review changes (#511)

* more changes

* small changes

* small changes

* small changes

* Update lib/ts/recipe/emailpassword/api/implementation.ts

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* more fixes - ts still not compiling

* fixes all ts issues

---------

Co-authored-by: Rishabh Poddar <[email protected]>
* email verification recipe changes for account linking

* email verification recipe changes for account linking

* email verification recipe changes for account linking

* recipe interface changes for account linking

* account linking implementation

* user context update

* code udpate

* types update

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/types.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* return type update

* index file updated

* merge with account-linking interface

* Update lib/ts/recipe/accountlinking/recipeImplementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* Update lib/ts/recipe/accountlinking/recipeImplementation.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* Update lib/ts/recipe/accountlinking/recipe.ts

Co-authored-by: Rishabh Poddar <[email protected]>

* code review changes

* code review changes

* code review changes

* code review changes

* review changes

* sign-up post login updated

* sign-up post login updated

* sign-up API implementation update

* updating email verification api implementation

* import update

* function import update

* changes in signup recipeimplementation

* email verify get changes

* recipeImplementation types update

* merge with 13.0

* merge with account-linking implementation

* merge with 13.0

* recipe implementation update

* account linking claim

* session claim update

* session claim update

* merges with latest

* more changes

* more changes

* removes account linking claim post linkAccounts or createPrimaryUser function call

* refactor

* small change

* small change

* exposes help functions in account linking recipe

* refactor and works on generate email verification token API

* completes generate email verification token API

* adds todos

* more changes

* refactor

* removes unnecessary function from recipes

* resolves a few todos

* fixes dashboard api for email verification

* fixes an issue where we tried linking account even in email verify get API

* adds account linking in very email recipe function

---------

Co-authored-by: Rishabh Poddar <[email protected]>
* merges

* rebuilds docs
* gets tests to run

* resets account linking between tests

* fixes a test

* adds mocking for a few APIs

* more fixes

* fixes more bugs

* fixes a test

* fixes more tests

* fixes a small bug

* enforces normlised checks when comparing account info in logic

* fixes a test

* fixes a few more tests

* fixes more tests

* fixes more tests

* fixes more tests

* more test fixes

* more test fixes

* more change

* fixes more tests

* more changes

* adds id and recipeId to email verification sendEmail function

* test fix

* fixes more tests

* fixes more tests

* fixes more tests

* more test fixes

* fixes more tests

* fixes more tests

* fixes more tests

* more test fixes

* fixes more tests

* more test fixes

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* small change to a test

* fixes more tests

* fixes more tests

* some type changes

* fixes cyclic dependency test

* edits github acount to allow mocking
* WIP - fixes a few bugs, and adds adds the concept of a recipeUserId type

* gets everything to compile

* modifies tests

* fixes tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes a test

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests and adds a toJson function in the user object to convert recipe user id object type to a string in the json response

* fixes more tests

* fixes issue with allowing emial password sign up for a primary email

* renames an API function name

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests
* removes unnecessary recipe functions

* adds primary user creation test'

* adds test todos

* adds test todos

* adds more tests

* adds more tests

* adds more tests

* more tests

* more tests

* more tests

* adds more tests

* more mocking

* more tests

* more tests

* adds more tests

* removes normalisedInputMap structure

* more tests

* adds more tests

* changes impl of does email exist

* more tests

* adds more tests

* adds more tests

* more changes

* adds auto marking of email verification based on linking

* adds more tests

* more tests

* remove a todo

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* fixes a bug + adds more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* changes path of API

* small changes to dashboard related APIs

* fixes a bug and adds more tests

* adds more tests

* adds more tests

* more tests

* more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests and adds recipe user id to password reset email send email function

* moves check for isSignUpAllowed to api layer

* renames a variable

* adds more checks to allowSignUp function

* modifies update email or password function

* more tests

* more tests

* adds comments

* adds more tests

* adds more tests

* adds comments

* adds test cases skeleton

* adds one test for password reset

* adds more tests

* adds more tests

* adds more tests

* more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* enhances tests

* starts working on session tests

* fixes a test

* adds more tests

* adds more tests

* renames a function

* adds more tests

* more tests

* adds more tests

* adds more tests

* adds a TODO

* adds more tests

* removes unnecessary call to a function in email verification recipe

* adds more tests

* add new tests

* add new tests

* adds more tests

* adds more tests

* adds more tests
* removes use of account linking claim

* starts working on modifying tests

* changes output of one API

* changes output of an API

* modifies tests

* fixes tests

* fixes tests

* fixes tests

* fixes more tests
* starts working on type changes

* makes more progress

* refactors a lot of code

* gets everything to compile

* starts fixing tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* fixes more tests

* removes unnecessary code

* fixes more tests

* fixes more tests

* fixes more tests

* more tests

* adds more checks

* more tests

* adds more tests

* more tests

* removes unnecessary code

* adds more tests

* changes status type to make it more clear

* adds new param to listUsersByAccountInfo

* more changes

* adds more tests

* fixes an issue

* adds more comments

* more changes

* more changes

* more changes

* more changes

* fixes a test

* changes

* changes

* changes

* adds comments and tests

* adds more tests

* renames a var

* modifies API spec a bit

* adds more tests

* adds more tests

* removes post sessison account linking API but keeps the function

* adds a few more checks

* fixes a few bugs

* fixes tests

* removes unneeded check
…or email verification (#584)

* adds missing checks

* more changes

* adds function for isSignInAllowed

* adds isEmailVerified function

* more refactor

* adds a TODO

* more changes

* completes more todos

* finishes more todos

* adds account linking during sign in as well

* more refactors

* changes a comment

* small changes

* fixes a cyclic dependency issue

* fixes a test

* fixes tests

* fixes a bug

* more test fixes

* more changes

* fixes tests

* fixes more tests

* more changes

* fixes tests

* adds a new test

* bug fixes

* fixes cyclic dependency issues

* more fixes

* adds more tests

* adds more tests

* adds a comment

* adds more tests

* more tests

* more changes

* more tests

* adds tests and fixes a bug

* adds more tests

* adds more tests

* adds more tests

* adds more tests

* more tests

* adds more tests
@porcellus porcellus changed the base branch from 15.0 to 15.2 September 12, 2023 21:35
@rishabhpoddar rishabhpoddar changed the base branch from 15.2 to 16.0 September 15, 2023 08:50
CHANGELOG.md Outdated

- Now only supporting CDI 4.0
- Now supporting FDI 1.18
- removed the recipe specific `User` type, now all functions are using the new generic `User` type
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- removed the recipe specific `User` type, now all functions are using the new generic `User` type
- Removed the recipe specific `User` type, now all functions are using the new generic `User` type

Copy link
Contributor

Choose a reason for hiding this comment

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

Also link to this page: supertokens.com/docs/thirdpartyemailpassword/user-object

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated
Comment on lines 158 to 163

- You can check if a new primary user was created by `EmailPassword.signUp`, `signUpPOST` or `createNewRecipeUser` (and their ThirdParyEmailPassword counterparts) by:

```
const isNewPrimaryUser = res.user.loginMethod.length === 1;
```
Copy link
Contributor

Choose a reason for hiding this comment

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

huh? Not sure why this is needed. Did you mean that you can check if a new user signed in?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, this is different from the above, since EP signup doesn't have createdNewRecipeUser

// ...
});
```

Copy link
Contributor

Choose a reason for hiding this comment

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

Need to have a section on frontend / core migration needed - that these are the versions of the frontend and core.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The supported FE version didn't change if you are not using account linking, and the core is mentioned above. I can add a section/link here pointing to the account linking recipe docs.

.github/PULL_REQUEST_TEMPLATE.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
@rishabhpoddar rishabhpoddar merged commit fbf5135 into 16.0 Sep 20, 2023
4 of 13 checks passed
@rishabhpoddar rishabhpoddar deleted the account-linking branch September 20, 2023 06:17
export function isAnIpAddress(ipaddress: string) {
return /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(
ipaddress
);
}

export function getBackwardsCompatibleUserInfo(
Copy link
Contributor

@rishabhpoddar rishabhpoddar Dec 2, 2023

Choose a reason for hiding this comment

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

(do not resolve this comment) the implementation of this function has changed slightly in this PR: #749

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants