This repository was archived by the owner on Apr 19, 2023. It is now read-only.
v3.0.0
v3.0.0 (2020-11-08)
✨ New features
47ceb5bcAdd support for login links161b2643Add endpoint for password detailsef5654dbShip Casbin-powered permissions (fixed #337)
(Issues:#337)-872559c6Add user access token scopes endpoint5225c309Add API scopes endpoint8de94323Add gender prediction APIe9baebd9Auto-fill country, timezonecbb355eeAdd Sentryff44de69Add support for disabling billingb248d84cAdd new user registrations check54774f25Add newUserRegistrationDomains checkd6beaf83Add Prisma CRUD endpointsb1074976Add pipes for optional int, order by6b732e2aAdd support for cursor6d43fcfeUse DTO in PATCH methodc9f03df3Add auth module with registerc9291532Add registration with email conflict checkb311e5afAdd common configuration7b6902d8Render and send emails9fe994d3Add HTML email layouta7979c22Add resend email verification endpoint3b4a4680Add authentication5abd4987Add refresh token endpointd1e9e252Add scope authorization in Guard93d82e1cExpose data by removing secrets0e7c8b20Add session endpoints8233d52aAdd endpoints for access tokens276c95a3Add endpoints for user membershipsf7082e0fAdd emails module818ad11aAdd groups endpoints26c0c0efAdd group membership controllera642b7eaSupport creating groups, memberships183b6749Add Pwned module21a7cb4fAdd support for password change, refactor authd99de49cAdd scheduler to delete sessionsb3ec3fc4Add helmet for security754495e1Add OpenAPI docse3628898Add tokens module, 2FA9aaee67aAdd logout endpointcee3a55cAdd 2FA enable/disable endpointsf8f47f29Add password forgot/reset339a29daAdd verify emails endpointe4e78e1dAdd approved subnets endpointsb3f60938Add geolocation service2c892e83Add approve subnet endpoint0f219cdcAdd support for MFA when logging ine314375bLogin with email token endpoints8c7f926bSend membership welcome email9857fbc5Support logging in backup codef1337775Add group API keys module62ee163dAdd basic Stripe module0dc4b422Add Stripe invoices endpointsec9ec37bAdd Twilio modulece710401Add SMS MFA OTPb147b685Add email MFAf39eddacAdd Stripe sources endpoints74df85c2Add API key scopes2a8170f1Add domain module59a4a7cbAdd DNS modulee160f8efAdd HTML domain verification9da99653Add subscription endpoints7506cb20Handle Stripe webhook event049e3eb0Add audit logs module36bda486Create audit log47869cddAdd webhooks module53ebb4a8Trigger webhooks on audit log8a5c0152Implement LRU for API keysbf9976d8Add API key users controllers7c35bd21Serve static filescbc8034cAdd support for merging users (fixed #950)
(Issues:#950)-727b6112Add SMS-based MFA method
♻️ Updates
3dadf22fChange snake to camel casee7ab0eb7Change organization to group5cd080eaUpdate organization group9691e797Update user service referencesdd86fb40Update orgefbc78f9Organize imports, update user restcabd9e13Make login password optional8b2e8e12Use object param for mail6b09c3e3Allow all attributes in mail4dc4bf69Update helpers91ac3cc6Use TWT instead of username3f3ccf14Use number for ID, not string8cae2670Remove fallback from TWT0efe1c8fUse number instead of string in ID1a7a1181Use number IDs in controllers170ba999Add login link token to email5edf233aUse number ID for user, validate numbera3535905Use number for org ID2c201062Use TWT for IDse70fa98cUse TWT of length 108327891fSupport all id-like keys with TWTbba4a39aAllow empty passwordsae0022b9Add decode TWT function5a6fa2e7Use string for ID validation08a2c53aUse Joi.number() for ID8c90ee64use take in restd598a1f1Use any for res.locals9558c36dUse take in Prisma905e0181Use new authorization helper in user.ts9301944aAdd Casbin admin scopes02799be5Use new authorization can in group, auth28b0b142Change params to subject, action, objectcd1fb73eRemove expiry from access tokensfefcdba2Move access token scopes to security2a75733fUse constants in policy13490a14Update delete casbin policies3fac6c93Remove username validation63577fadChange API key, access token length to 32629b7aacUpdate group ID as attribute1e040a76Change stripeCustomerId to stripeCustomer9b760e1dSkip test for Stripecd433d17Make tracking optionald83146ceCheck tracking config before ES0f300e3bMove some config from file733f923dUse config helpr instead of importsb4c6176dUse email config with Nodemailer interface34eb080fUse session UUID as refresh token527ab9a3Get user ID, scopes in JWT strategy3e259b43Use access toke ngenerator abstraction6a31e886Use local scope guards (https://stackoverflow.com/a/50801832/1656944)d30ce2faUse session ID as param959dc7b8Use global guards, @public decoratorbe84f02fUse new scope structure915c5ae6Send email not verified exception messageb7cf9f39Hash passwords, ensure uncompromised62d6ae04Use prisma directly not authServicef7697ebdUse safe email helper75fc733fLowercase, remove plus from emaile69cc370Use import instead of import type750eb880Change 2fa to totp0857ae77Use auth module-scoped constants3fb490faChange approved location -> approved subnetfe973961Hash approved subnetsd0bb693cAdd cache to geolocationd9899226Store geolocation in approved subnets24afea03Approve new subnets in auth63bac411Allow adding team members without nameffd8fdf8Generate/regenerate backup codes in 2FAe3349735Add email verification templated4c10d29Add create/delete/replace customer endpoint560c03acAllow uppercase sorting6c2897daUse relative import paths170bc5deUse .env data in configuration20d8cebbChange twoFactorEnabled -> twoFactorMethodb5d94ce7Use TokensService for UUIDb490af16Update scopes in controllers3253de5bNormalize domain URLc401a330Normalize +, . in emailsc0b928a8Use raw/JSON middlewarec797457bChange auth controller login routesaa80db1bUse constant for login token suba39009b7Add membership module to app27066a69Add pretty profile pictures for domain, group, user86a456d1Add ID to auth token43e85967Use Gravatar as user profile picture5a1cb701Add audit log decorators on controller74705d67Add webhook scopes to API key6c546cfaAdd webhook scopes endpoint89af8027Add group/user methods in API kesc84bccbaAdd API key scopes for user24f0d246Only allow clean, secure scopes in API keysb32c5af3Use custom JWT strategy49ed4a47Support referrer restrictions in API keyse24b26d0Check IP address restrictions in API keys269d1f17Rename jwt -> staart in auth500534bfUse user object in auth objects149651c2Use service name in loggers8ac6f7f3Send response time headers8e248ffaDon't use native errors402ce140Don't use HttpExceptiona7ee700fUse error constants91aba2e3Add constants errors in pipesd0e58468Add descriptions for errors52e5de85Add global controller prefix
🐛 Bug fixes
cf4a8fd7Wait for token to be generated128d995bUse Tokens.LOGIN_LINK to verify JWT661bf6d0Use string for userId in TWT75fc64fcUse take instead of first97b21181Use TWT in local to token780e7d6bUse where with ID keyaea4d9f0Use numbers not TWTs in controllersb3f2f9bcUse string adapter for casbin model294a5682Use integer IDs, not TWTs, in casbin policy14f3182eChange scopes type in access token, API key17f07562Make sure user has a verified emaildc67971eOnly allow admin, member roles in teams4d070cf1Create memberships manually27baa6ecAllow prefers email ID3a0f0c4dChange profilePicture to Url suffix87c9b13eFix stripe customer ID keyd3c8c255Change imports to config5e6d6918Make keys in DTO optionalf27c6b9dEnsure result exists before accessing usera166eaa1Fix use authentication in class9cdea097Specify IP address when adding member, add module97096b3fUse object payload for JWT99f9058dFix registration, location10a4b3c0Fix password hash in Pwned087701eaUse module imports, not servicefb46eeb4Import StripeModulef883155bMove scopes endpoint to tope2541a16Add ConfigModule to ApiKeysModule
🔒 Security issues
⬆️ Dependency updates
5693784bUpdate @staart/redisc38e0464Update @staart/redis to v2.3.0b9e775fdUpdate @staart/scripts to v1.17.0713dc5afUpdate @staart/payments to v4.0.059f2ec6bUpdate @prisma to v2.4.16e121dc5Update twt to v1.2.071f81595Update cosmic to v1.0.1517fd0d1Update @staart/scripts to v1.18.09bf7fcb5Update staart/scripts to v1.18.151c8f8e8Update @staart/elasticsearch to v2.2.40edb1ad5Update @staart/scripts to v1.18.2114e200dUpdate @sentry/node, @staart/scripts34242e21Update update-template to v1.1.21262a0ffUpdate all dependencies5f48cf67Update all dependencies
💥 Breaking changes
ec11d6f2Add v3