Skip to content

Commit

Permalink
Merge branch '7.1' into feat/mt-dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed Jul 8, 2024
2 parents f73d3ed + 1d7c95d commit 4ce2b78
Show file tree
Hide file tree
Showing 50 changed files with 1,209 additions and 856 deletions.
23 changes: 17 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,38 @@
## Summary of change

(A few sentences about this PR)

## 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!)

(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](https://github.com/supertokens/docs), or create a checklist here highlighting the necessary changes)

(If relevant, please create a PR in our [docs repo](https://github.com/supertokens/docs), or create a checklist here
highlighting the necessary changes)

## Checklist for important updates

- [ ] Changelog has been updated
- [ ] `pluginInterfaceSupported.json` file has been updated (if needed)
- [ ] Changes to the version if needed
- In `build.gradle`
- In `build.gradle`
- [ ] Had installed and ran the pre-commit hook
- [ ] If there are new dependencies that have been added in `build.gradle`, please make sure to add them in `implementationDependencies.json`.
- [ ] If there are new dependencies that have been added in `build.gradle`, please make sure to add them
in `implementationDependencies.json`.
- [ ] 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.
- 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.
- [ ] When adding new recipes, ensure that its performance is being measured in the `OneMillionUsersTest`

## Remaining TODOs for this PR

- [ ] Item1
- [ ] Item2
24 changes: 12 additions & 12 deletions .github/helpers/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "helpers",
"version": "1.0.0",
"description": "",
"main": "test-pass-check-pr.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"github-workflow-helpers": "github:supertokens/github-workflow-helpers"
}
"name": "helpers",
"version": "1.0.0",
"description": "",
"main": "test-pass-check-pr.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"github-workflow-helpers": "github:supertokens/github-workflow-helpers"
}
}
12 changes: 6 additions & 6 deletions .github/workflows/github-actions-changelog.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: "Enforcing changelog in PRs Workflow"
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ]

jobs:
# Enforces the update of a changelog file on every pull request
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dangoslen/changelog-enforcer@v2
with:
changeLogPath: 'CHANGELOG.md'
skipLabels: 'Skip-Changelog'
- uses: actions/checkout@v2
- uses: dangoslen/changelog-enforcer@v2
with:
changeLogPath: 'CHANGELOG.md'
skipLabels: 'Skip-Changelog'
30 changes: 15 additions & 15 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: "Lint PR Title"

on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
pull_request:
types:
- opened
- reopened
- edited
- synchronize

jobs:
pr-title:
name: Lint PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
validateSingleCommit: true
pr-title:
name: Lint PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
validateSingleCommit: true
38 changes: 19 additions & 19 deletions .github/workflows/tests-pass-check-pr.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: "Check if \"Run tests\" action succeeded"

on:
pull_request:
types:
- opened
- reopened
- edited
- synchronize
pull_request:
types:
- opened
- reopened
- edited
- synchronize

jobs:
pr-run-test-action:
name: Check if "Run tests" action succeeded
timeout-minutes: 60
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: node install
run: cd ./.github/helpers && npm i
- name: Calling github API
run: cd ./.github/helpers && GITHUB_TOKEN=${{ github.token }} REPO=${{ github.repository }} RUN_ID=${{ github.run_id }} BRANCH=${{ github.head_ref }} JOB_ID=${{ github.job }} SOURCE_OWNER=${{ github.event.pull_request.head.repo.owner.login }} CURRENT_SHA=${{ github.event.pull_request.head.sha }} node node_modules/github-workflow-helpers/test-pass-check-pr.js
pr-run-test-action:
name: Check if "Run tests" action succeeded
timeout-minutes: 60
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: node install
run: cd ./.github/helpers && npm i
- name: Calling github API
run: cd ./.github/helpers && GITHUB_TOKEN=${{ github.token }} REPO=${{ github.repository }} RUN_ID=${{ github.run_id }} BRANCH=${{ github.head_ref }} JOB_ID=${{ github.job }} SOURCE_OWNER=${{ github.event.pull_request.head.repo.owner.login }} CURRENT_SHA=${{ github.event.pull_request.head.sha }} node node_modules/github-workflow-helpers/test-pass-check-pr.js
14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ on:
inputs:
coreRepoOwnerName:
description: 'supertokens-core repo owner name'
default: supertokens
default: supertokens
required: true
coreRepoBranch:
description: 'supertokens-core repos branch name'
default: master
default: master
required: true
pluginRepoOwnerName:
description: 'supertokens-plugin-interface repo owner name'
default: supertokens
default: supertokens
required: true
pluginInterfaceBranch:
description: 'supertokens-plugin-interface repos branch name'
default: master
default: master
required: true

jobs:
Expand All @@ -30,10 +30,10 @@ jobs:
mysql:
image: mysql:latest
env:
MYSQL_DATABASE: supertokens
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: supertokens
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5

steps:
Expand Down
59 changes: 31 additions & 28 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ ALTER TABLE tenant_configs ALTER COLUMN is_first_factors_null DROP DEFAULT;
- Support for MFA recipe
- Adds `firstFactors` and `requiredSecondaryFactors` for tenant config.
- Adds a new `useStaticKey` param to `updateSessionInfo_Transaction`
- This enables smooth switching between `useDynamicAccessTokenSigningKey` settings by allowing refresh calls to
change the signing key type of a session
- This enables smooth switching between `useDynamicAccessTokenSigningKey` settings by allowing refresh calls to
change the signing key type of a session
- Fixes performance issue with user pagination

### Migration
Expand Down Expand Up @@ -68,13 +68,13 @@ ALTER TABLE user_roles

- Fixes the issue where passwords were inadvertently logged in the logs.
- Adds tests to check connection pool behaviour.
- Adds `mysql_idle_connection_timeout` and `mysql_minimum_idle_connections` configs to control active connections to the database.
- Adds `mysql_idle_connection_timeout` and `mysql_minimum_idle_connections` configs to control active connections to the
database.

## [5.0.5] - 2023-12-06

- Validates db config types in `canBeUsed` function


## [5.0.4] - 2023-11-10

- Adds index on `app_id_to_user_id` table to improve performance of get user by id queries
Expand Down Expand Up @@ -107,15 +107,16 @@ CREATE INDEX app_id_to_user_id_user_id_index ON app_id_to_user_id (user_id);
### Changes

- Support for Account Linking
- Adds columns `primary_or_recipe_user_id`, `is_linked_or_is_a_primary_user` and `primary_or_recipe_user_time_joined` to `all_auth_recipe_users` table
- Adds columns `primary_or_recipe_user_id` and `is_linked_or_is_a_primary_user` to `app_id_to_user_id` table
- Removes index `all_auth_recipe_users_pagination_index` and addes `all_auth_recipe_users_pagination_index1`,
`all_auth_recipe_users_pagination_index2`, `all_auth_recipe_users_pagination_index3` and
`all_auth_recipe_users_pagination_index4` indexes instead on `all_auth_recipe_users` table
- Adds `all_auth_recipe_users_recipe_id_index` on `all_auth_recipe_users` table
- Adds `all_auth_recipe_users_primary_user_id_index` on `all_auth_recipe_users` table
- Adds `email` column to `emailpassword_pswd_reset_tokens` table
- Changes `user_id` foreign key constraint on `emailpassword_pswd_reset_tokens` to `app_id_to_user_id` table
- Adds columns `primary_or_recipe_user_id`, `is_linked_or_is_a_primary_user`
and `primary_or_recipe_user_time_joined` to `all_auth_recipe_users` table
- Adds columns `primary_or_recipe_user_id` and `is_linked_or_is_a_primary_user` to `app_id_to_user_id` table
- Removes index `all_auth_recipe_users_pagination_index` and addes `all_auth_recipe_users_pagination_index1`,
`all_auth_recipe_users_pagination_index2`, `all_auth_recipe_users_pagination_index3` and
`all_auth_recipe_users_pagination_index4` indexes instead on `all_auth_recipe_users` table
- Adds `all_auth_recipe_users_recipe_id_index` on `all_auth_recipe_users` table
- Adds `all_auth_recipe_users_primary_user_id_index` on `all_auth_recipe_users` table
- Adds `email` column to `emailpassword_pswd_reset_tokens` table
- Changes `user_id` foreign key constraint on `emailpassword_pswd_reset_tokens` to `app_id_to_user_id` table

### Migration

Expand Down Expand Up @@ -200,16 +201,16 @@ CREATE INDEX app_id_to_user_id_user_id_index ON app_id_to_user_id (user_id);

- Fixes duplicate users in users search queries when user is associated to multiple tenants


## [4.0.0] - 2023-06-02

### Changes

- Support for multitenancy
- New tables `apps` and `tenants` have been added.
- Schema of tables have been changed, adding `app_id` and `tenant_id` columns in tables and constraints & indexes have been modified to include this columns.
- New user tables have been added to map users to apps and tenants.
- New tables for multitenancy have been added.
- New tables `apps` and `tenants` have been added.
- Schema of tables have been changed, adding `app_id` and `tenant_id` columns in tables and constraints & indexes
have been modified to include this columns.
- New user tables have been added to map users to apps and tenants.
- New tables for multitenancy have been added.
- Increased transaction retry count to 50 from 20.

### Migration
Expand Down Expand Up @@ -1044,35 +1045,37 @@ CREATE INDEX app_id_to_user_id_user_id_index ON app_id_to_user_id (user_id);
### Migration

- If using `access_token_signing_key_dynamic` false in the core:
- ```sql
ALTER TABLE session_info ADD COLUMN use_static_key BOOLEAN NOT NULL DEFAULT true;
ALTER TABLE session_info ALTER COLUMN use_static_key DROP DEFAULT;
- ```sql
ALTER TABLE session_info ADD COLUMN use_static_key BOOLEAN NOT NULL DEFAULT true;
ALTER TABLE session_info ALTER COLUMN use_static_key DROP DEFAULT;
```
- ```sql
- ```sql
INSERT INTO jwt_signing_keys(key_id, key_string, algorithm, created_at)
select CONCAT('s-', created_at_time) as key_id, value as key_string, 'RS256' as algorithm, created_at_time as created_at
from session_access_token_signing_keys;
```
- If using `access_token_signing_key_dynamic` true (or not set) in the core:
- ```sql
ALTER TABLE session_info ADD COLUMN use_static_key BOOLEAN NOT NULL DEFAULT false;
ALTER TABLE session_info ALTER COLUMN use_static_key DROP DEFAULT;
- ```sql
ALTER TABLE session_info ADD COLUMN use_static_key BOOLEAN NOT NULL DEFAULT false;
ALTER TABLE session_info ALTER COLUMN use_static_key DROP DEFAULT;
```

## [2.4.0] - 2023-03-30

- Support for Dashboard Search

## [2.3.0] - 2023-03-27

- Support for TOTP recipe
- Support for active users

### Database changes

- Add new tables for TOTP recipe:
- `totp_users` that stores the users that have enabled TOTP
- `totp_user_devices` that stores devices (each device has its own secret) for each user
- `totp_used_codes` that stores used codes for each user. This is to implement rate limiting and prevent replay attacks.
- `totp_users` that stores the users that have enabled TOTP
- `totp_user_devices` that stores devices (each device has its own secret) for each user
- `totp_used_codes` that stores used codes for each user. This is to implement rate limiting and prevent replay
attacks.
- Add `user_last_active` table to store the last active time of a user.

## [2.2.0] - 2023-02-21
Expand Down
Loading

0 comments on commit 4ce2b78

Please sign in to comment.