-
Notifications
You must be signed in to change notification settings - Fork 0
Development #66
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
base: main
Are you sure you want to change the base?
Development #66
Changes from all commits
e969e39
954c6b7
a718ee6
1fa5c4d
657c6d4
5660ac7
dcbee9e
65ae474
e29f988
cb71493
e9f8bd6
6c02867
71e2206
219666a
4ccc344
b5d9719
a23bfe0
3db18da
13cec66
589ca1a
0e31f43
f68a477
976e7ba
3428758
8a85cac
a299b97
bb3ea5c
24d9fc4
321d591
5efaf45
109e77d
d43220a
7c19a9b
543d5a1
7bff366
7a8c133
565486b
1925699
efa4683
a6133e8
628fc71
402d810
cb52c6d
870cf66
22b1259
055ad2b
aa52099
cce776a
1d3fa3f
9442d9a
eb72c5f
f3ac52d
dce0ef2
dacd939
375a26d
f55862f
783f703
6edb4e3
6f8af13
7382383
6c52315
5e48430
bdcbc36
e453fa2
07345ae
a6912a8
066da83
4632223
26c7247
ed7fe8d
47202b4
83f23f8
e898b4a
9ca007a
f3f00e3
9ab9e54
03fe344
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: Refresh Token Cleanup | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: '0 3 * * *' # every day at 03:00 UTC | ||
| workflow_dispatch: {} | ||
|
|
||
| jobs: | ||
| cleanup: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Setup Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '18' | ||
| - name: Install deps | ||
| run: npm ci | ||
| - name: Run cleanup script | ||
| env: | ||
| SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | ||
| SUPABASE_KEY: ${{ secrets.SUPABASE_SERVICE_ROLE_KEY }} | ||
| run: node scripts/cleanup_refresh_tokens.js 30 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -150,8 +150,19 @@ If automation is failing or you prefer manual control, change the preview link y | |
| SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key | ||
| JWT_SECRET=your-secure-jwt-secret-here | ||
| ADMIN_API_TOKEN=your-admin-api-token | ||
|
|
||
| # Encryption keys for server-side refresh-token storage (required for dev) | ||
| # Preferred: provide multiple keys for rotation in order (newest first): | ||
| # REFRESH_TOKEN_ENC_KEYS=<keyId1>=<secret1>,<keyId2>=<secret2> | ||
| # Example: | ||
| # REFRESH_TOKEN_ENC_KEYS=k2=NEW_SECRET,k1=OLD_SECRET | ||
| # Legacy single-key option (not recommended for rotation): | ||
| # REFRESH_TOKEN_ENC_KEY=your-secret | ||
| # REFRESH_TOKEN_ENC_KEY_ID=k1 | ||
|
Comment on lines
+154
to
+161
|
||
| ``` | ||
|
|
||
| Note: The dev auth server requires `REFRESH_TOKEN_ENC_KEY` (or `REFRESH_TOKEN_ENC_KEYS`) to be set and will fail to start without it. In production, set the same variables in your deployment environment. Use the multi-key `REFRESH_TOKEN_ENC_KEYS` format to rotate keys safely: add the new key first, leave old keys present until tokens have migrated, then remove old keys. | ||
|
|
||
| 4. **Generate Secure JWT Secret** | ||
| ```bash | ||
| node -e "console.log(require('crypto').randomBytes(64).toString('hex'))" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.