Skip to content

Commit 1c6b8b7

Browse files
committed
reformats code
1 parent fba9858 commit 1c6b8b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1011
-704
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,38 @@
11
## Summary of change
2+
23
(A few sentences about this PR)
34

45
## Related issues
6+
57
- Link to issue1 here
68
- Link to issue1 here
79

810
## Test Plan
9-
(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!)
11+
12+
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your
13+
changes work. Bonus points for screenshots and videos!)
1014

1115
## Documentation changes
12-
(If relevant, please create a PR in our [docs repo](https://github.com/supertokens/docs), or create a checklist here highlighting the necessary changes)
16+
17+
(If relevant, please create a PR in our [docs repo](https://github.com/supertokens/docs), or create a checklist here
18+
highlighting the necessary changes)
1319

1420
## Checklist for important updates
21+
1522
- [ ] Changelog has been updated
1623
- [ ] `pluginInterfaceSupported.json` file has been updated (if needed)
1724
- [ ] Changes to the version if needed
18-
- In `build.gradle`
25+
- In `build.gradle`
1926
- [ ] Had installed and ran the pre-commit hook
20-
- [ ] If there are new dependencies that have been added in `build.gradle`, please make sure to add them in `implementationDependencies.json`.
27+
- [ ] If there are new dependencies that have been added in `build.gradle`, please make sure to add them
28+
in `implementationDependencies.json`.
2129
- [ ] Issue this PR against the latest non released version branch.
22-
- 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.
23-
- If no such branch exists, then create one from the latest released branch.
30+
- To know which one it is, run find the latest released tag (`git tag`) in the format `vX.Y.Z`, and then find the
31+
latest branch (`git branch --all`) whose `X.Y` is greater than the latest released tag.
32+
- If no such branch exists, then create one from the latest released branch.
2433
- [ ] When adding new recipes, ensure that its performance is being measured in the `OneMillionUsersTest`
34+
2535
## Remaining TODOs for this PR
36+
2637
- [ ] Item1
2738
- [ ] Item2

.github/helpers/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"name": "helpers",
3-
"version": "1.0.0",
4-
"description": "",
5-
"main": "test-pass-check-pr.js",
6-
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
8-
},
9-
"author": "",
10-
"license": "ISC",
11-
"dependencies": {
12-
"github-workflow-helpers": "github:supertokens/github-workflow-helpers"
13-
}
2+
"name": "helpers",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "test-pass-check-pr.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"dependencies": {
12+
"github-workflow-helpers": "github:supertokens/github-workflow-helpers"
13+
}
1414
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
name: "Enforcing changelog in PRs Workflow"
22
on:
33
pull_request:
4-
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
4+
types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ]
55

66
jobs:
77
# Enforces the update of a changelog file on every pull request
88
changelog:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v2
12-
- uses: dangoslen/changelog-enforcer@v2
13-
with:
14-
changeLogPath: 'CHANGELOG.md'
15-
skipLabels: 'Skip-Changelog'
11+
- uses: actions/checkout@v2
12+
- uses: dangoslen/changelog-enforcer@v2
13+
with:
14+
changeLogPath: 'CHANGELOG.md'
15+
skipLabels: 'Skip-Changelog'
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
name: "Lint PR Title"
22

33
on:
4-
pull_request:
5-
types:
6-
- opened
7-
- reopened
8-
- edited
9-
- synchronize
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- edited
9+
- synchronize
1010

1111
jobs:
12-
pr-title:
13-
name: Lint PR title
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: amannn/action-semantic-pull-request@v3
17-
env:
18-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19-
with:
20-
validateSingleCommit: true
12+
pr-title:
13+
name: Lint PR title
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: amannn/action-semantic-pull-request@v3
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
with:
20+
validateSingleCommit: true
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
name: "Check if \"Run tests\" action succeeded"
22

33
on:
4-
pull_request:
5-
types:
6-
- opened
7-
- reopened
8-
- edited
9-
- synchronize
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- edited
9+
- synchronize
1010

1111
jobs:
12-
pr-run-test-action:
13-
name: Check if "Run tests" action succeeded
14-
timeout-minutes: 60
15-
concurrency:
16-
group: ${{ github.head_ref }}
17-
cancel-in-progress: true
18-
runs-on: ubuntu-latest
19-
steps:
20-
- uses: actions/checkout@v2
21-
- name: node install
22-
run: cd ./.github/helpers && npm i
23-
- name: Calling github API
24-
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
12+
pr-run-test-action:
13+
name: Check if "Run tests" action succeeded
14+
timeout-minutes: 60
15+
concurrency:
16+
group: ${{ github.head_ref }}
17+
cancel-in-progress: true
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: node install
22+
run: cd ./.github/helpers && npm i
23+
- name: Calling github API
24+
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

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ on:
44
inputs:
55
coreRepoOwnerName:
66
description: 'supertokens-core repo owner name'
7-
default: supertokens
7+
default: supertokens
88
required: true
99
coreRepoBranch:
1010
description: 'supertokens-core repos branch name'
11-
default: master
11+
default: master
1212
required: true
1313
pluginRepoOwnerName:
1414
description: 'supertokens-plugin-interface repo owner name'
15-
default: supertokens
15+
default: supertokens
1616
required: true
1717
pluginInterfaceBranch:
1818
description: 'supertokens-plugin-interface repos branch name'
19-
default: master
19+
default: master
2020
required: true
2121

2222
jobs:

CHANGELOG.md

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1717
- Support for MFA recipe
1818
- Adds `firstFactors` and `requiredSecondaryFactors` for tenant config.
1919
- Adds a new `useStaticKey` param to `updateSessionInfo_Transaction`
20-
- This enables smooth switching between `useDynamicAccessTokenSigningKey` settings by allowing refresh calls to
21-
change the signing key type of a session
20+
- This enables smooth switching between `useDynamicAccessTokenSigningKey` settings by allowing refresh calls to
21+
change the signing key type of a session
2222

2323
### Migration
2424

@@ -49,7 +49,8 @@ ALTER TABLE user_roles DROP CONSTRAINT IF EXISTS user_roles_role_fkey;
4949

5050
- Fixes the issue where passwords were inadvertently logged in the logs.
5151
- Adds tests to check connection pool behaviour.
52-
- Adds `postgresql_idle_connection_timeout` and `postgresql_minimum_idle_connections` configs to control active connections to the database.
52+
- Adds `postgresql_idle_connection_timeout` and `postgresql_minimum_idle_connections` configs to control active
53+
connections to the database.
5354

5455
## [5.0.6] - 2023-12-05
5556

@@ -89,15 +90,16 @@ CREATE INDEX IF NOT EXISTS app_id_to_user_id_primary_user_id_index ON app_id_to_
8990
### Changes
9091

9192
- Support for Account Linking
92-
- 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
93-
- Adds columns `primary_or_recipe_user_id` and `is_linked_or_is_a_primary_user` to `app_id_to_user_id` table
94-
- Removes index `all_auth_recipe_users_pagination_index` and addes `all_auth_recipe_users_pagination_index1`,
95-
`all_auth_recipe_users_pagination_index2`, `all_auth_recipe_users_pagination_index3` and
96-
`all_auth_recipe_users_pagination_index4` indexes instead on `all_auth_recipe_users` table
97-
- Adds `all_auth_recipe_users_recipe_id_index` on `all_auth_recipe_users` table
98-
- Adds `all_auth_recipe_users_primary_user_id_index` on `all_auth_recipe_users` table
99-
- Adds `email` column to `emailpassword_pswd_reset_tokens` table
100-
- Changes `user_id` foreign key constraint on `emailpassword_pswd_reset_tokens` to `app_id_to_user_id` table
93+
- Adds columns `primary_or_recipe_user_id`, `is_linked_or_is_a_primary_user`
94+
and `primary_or_recipe_user_time_joined` to `all_auth_recipe_users` table
95+
- Adds columns `primary_or_recipe_user_id` and `is_linked_or_is_a_primary_user` to `app_id_to_user_id` table
96+
- Removes index `all_auth_recipe_users_pagination_index` and addes `all_auth_recipe_users_pagination_index1`,
97+
`all_auth_recipe_users_pagination_index2`, `all_auth_recipe_users_pagination_index3` and
98+
`all_auth_recipe_users_pagination_index4` indexes instead on `all_auth_recipe_users` table
99+
- Adds `all_auth_recipe_users_recipe_id_index` on `all_auth_recipe_users` table
100+
- Adds `all_auth_recipe_users_primary_user_id_index` on `all_auth_recipe_users` table
101+
- Adds `email` column to `emailpassword_pswd_reset_tokens` table
102+
- Changes `user_id` foreign key constraint on `emailpassword_pswd_reset_tokens` to `app_id_to_user_id` table
101103

102104
### Migration
103105

@@ -178,21 +180,20 @@ CREATE INDEX IF NOT EXISTS app_id_to_user_id_primary_user_id_index ON app_id_to_
178180

179181
- Fixes null pointer issue when user belongs to no tenant.
180182

181-
182183
## [4.0.1] - 2023-07-11
183184

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

186-
187187
## [4.0.0] - 2023-06-02
188188

189189
### Changes
190190

191191
- Support for multitenancy
192-
- New tables `apps` and `tenants` have been added.
193-
- 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.
194-
- New user tables have been added to map users to apps and tenants.
195-
- New tables for multitenancy have been added.
192+
- New tables `apps` and `tenants` have been added.
193+
- Schema of tables have been changed, adding `app_id` and `tenant_id` columns in tables and constraints & indexes
194+
have been modified to include this columns.
195+
- New user tables have been added to map users to apps and tenants.
196+
- New tables for multitenancy have been added.
196197
- Increased transaction retry count to 50 from 20.
197198

198199
### Migration
@@ -1070,34 +1071,37 @@ CREATE INDEX IF NOT EXISTS app_id_to_user_id_primary_user_id_index ON app_id_to_
10701071
### Migration
10711072

10721073
- If using `access_token_signing_key_dynamic` false in the core:
1073-
- ```sql
1074-
ALTER TABLE session_info ADD COLUMN use_static_key BOOLEAN NOT NULL DEFAULT(true);
1075-
ALTER TABLE session_info ALTER COLUMN use_static_key DROP DEFAULT;
1074+
- ```sql
1075+
ALTER TABLE session_info ADD COLUMN use_static_key BOOLEAN NOT NULL DEFAULT(true);
1076+
ALTER TABLE session_info ALTER COLUMN use_static_key DROP DEFAULT;
10761077
```
1077-
- ```sql
1078+
- ```sql
10781079
INSERT INTO jwt_signing_keys(key_id, key_string, algorithm, created_at)
10791080
select CONCAT('s-', created_at_time) as key_id, value as key_string, 'RS256' as algorithm, created_at_time as created_at
10801081
from session_access_token_signing_keys;
10811082
```
10821083
- If using `access_token_signing_key_dynamic` true (or not set) in the core:
1083-
- ```sql
1084-
ALTER TABLE session_info ADD COLUMN use_static_key BOOLEAN NOT NULL DEFAULT(false);
1085-
ALTER TABLE session_info ALTER COLUMN use_static_key DROP DEFAULT;
1084+
- ```sql
1085+
ALTER TABLE session_info ADD COLUMN use_static_key BOOLEAN NOT NULL DEFAULT(false);
1086+
ALTER TABLE session_info ALTER COLUMN use_static_key DROP DEFAULT;
10861087
```
10871088

10881089
## [2.4.0] - 2023-03-30
10891090

10901091
- Support for Dashboard Search
10911092

10921093
## [2.3.0] - 2023-03-27
1094+
10931095
- Support for TOTP recipe
10941096
- Support for active users
10951097

10961098
### Database changes
1099+
10971100
- Add new tables for TOTP recipe:
1098-
- `totp_users` that stores the users that have enabled TOTP
1099-
- `totp_user_devices` that stores devices (each device has its own secret) for each user
1100-
- `totp_used_codes` that stores used codes for each user. This is to implement rate limiting and prevent replay attacks.
1101+
- `totp_users` that stores the users that have enabled TOTP
1102+
- `totp_user_devices` that stores devices (each device has its own secret) for each user
1103+
- `totp_used_codes` that stores used codes for each user. This is to implement rate limiting and prevent replay
1104+
attacks.
11011105
- Add `user_last_active` table to store the last active time of a user.
11021106

11031107
## [2.2.0] - 2023-02-21

0 commit comments

Comments
 (0)