Compare commits

...

1104 Commits

Author SHA1 Message Date
dbarrosop
7c9afc8980 release(packages/nhost-js): 4.2.0 2025-11-19 07:46:15 +00:00
David Barroso
ab890d8593 fix(cli): update traefik (#3710) 2025-11-19 08:45:12 +01:00
David Barroso
ee2d9763f7 feat(storage): added support for images/heic (#3694) 2025-11-19 08:21:43 +01:00
David Barroso
f7ea20db61 feat(docs): added guide to use the guild's codegen directly with Nhost (#3696) 2025-11-19 08:21:30 +01:00
David BM
99ac1aee3a chore(deps): update glob in packages to address vulnerability audit (#3711) 2025-11-18 15:43:12 +01:00
David BM
bb9aaf2903 fix(dashboard): parse and create one-click installs for run services correctly (#3679) 2025-11-18 10:10:26 +01:00
David BM
8e82edd0c6 chore(deps): update blob to address security advisory (#3704) 2025-11-18 09:10:40 +01:00
David BM
b0256da33f chore(docs): fix typos and broken link (#3703) 2025-11-17 12:10:36 +01:00
Moritz Klack
351daa5fbe chore(docs): typo (#3702) 2025-11-17 12:07:29 +01:00
David Barroso
4e9de6a764 feat(docs): added instructions for oauth2 sign in (#3701) 2025-11-17 10:06:25 +01:00
David BM
9dab347348 chore(deps): update js-yaml and validator to address security advisory (#3699) 2025-11-17 09:53:17 +01:00
David Barroso
6c044458ca fix(packages/nhost-js): react native needs special treatment when using FormData (#3697)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-17 08:37:26 +01:00
github-actions[bot]
5b98f4ece2 release(cli): 1.34.7 (#3695)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-13 10:37:08 +01:00
David Barroso
dc7d3fb4cc chore(cli): bump nhost/dashboard to 2.42.0 (#3693)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-13 10:07:25 +01:00
github-actions[bot]
d15717b67a release(cli): 1.34.6 (#3690)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-13 08:28:30 +01:00
David Barroso
a3c7f89eda fix(cli): mcp: specify items type for arrays in tools (#3687) 2025-11-13 08:23:03 +01:00
github-actions[bot]
6692e0dfc0 release(dashboard): 2.42.0 (#3688)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-13 08:21:19 +01:00
David Barroso
8541165781 chore(cli): update bindings (#3689) 2025-11-12 12:29:31 +01:00
robertkasza
5cd5ebbc65 feat(dashboard): datatable design improvements (#3657) 2025-11-12 12:02:30 +01:00
robertkasza
5066ef708a chore(dashboard): remove v2 ui components from datatable (#3568) 2025-11-12 11:26:32 +01:00
github-actions[bot]
a6a378c5a6 release(services/auth): 0.43.1 (#3682)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-11 12:58:31 +01:00
David Barroso
a3a3cf205d fix(auth): return meaningful error if the provider's account is already linked (#3680) 2025-11-11 12:56:59 +01:00
dependabot[bot]
3fd2e63db3 chore(ci): bump Codium-ai/pr-agent from 0.30 to 0.31 (#3676)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-10 08:56:17 +01:00
github-actions[bot]
f5956f1b2e release(cli): 1.34.5 (#3655)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-06 15:34:31 +01:00
David Barroso
f3b397b0d8 chore(cli): bump nhost/dashboard to 2.41.0 (#3669)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-06 13:42:32 +01:00
David Barroso
b7940087ee chore(cli): udpate certs and schema (#3675) 2025-11-06 13:04:09 +01:00
github-actions[bot]
3dae655858 release(services/storage): 0.9.1 (#3673)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-06 11:42:33 +01:00
David Barroso
2aa269734b fix(storage): format date-time headers with RFC2822 (#3672) 2025-11-06 11:40:11 +01:00
David Barroso
bc91836f83 chore(ci): replace the correct string on .github/workflows/dashboard_wf_release.yaml (#3670)
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-05 10:26:16 +01:00
github-actions[bot]
6d8b243571 release(dashboard): 2.41.0 (#3647)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-05 08:26:31 +01:00
David Barroso
c9967b1a6d feat(dashboard): get github repositories from github itself (#3640)
Co-authored-by: David BM <correodelnino@gmail.com>
2025-11-04 16:46:01 +01:00
github-actions[bot]
7f72aadff9 release(packages/nhost-js): 4.1.0 (#3586)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-04 16:21:25 +01:00
github-actions[bot]
8faf9565bb release(services/storage): 0.9.0 (#3654)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-04 16:21:16 +01:00
github-actions[bot]
7ac3f12852 release(services/auth): 0.43.0 (#3667)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-11-04 16:21:10 +01:00
David Barroso
184a3ed190 feat(internal/lib): common oapi middleware for go services (#3663) 2025-11-04 16:17:41 +01:00
David Barroso
372c4e32d4 fix(ci): match the version exactly to avoid matching on pre-releases (#3666) 2025-11-04 15:54:01 +01:00
David Barroso
a68d261d8e fix(nhost-js): improvements to Session guard to avoid conflict with ProviderSession (#3662) 2025-11-04 10:53:37 +01:00
David Barroso
55bda3f56b fix(auth): dont mutate client URL (#3660) 2025-11-03 10:56:14 +01:00
David Barroso
2311e1dd77 feat(auth): if the callback state is wrong send back to the redirectTo as provider_state (#3649) 2025-10-31 12:13:35 +01:00
David Barroso
824ee142c4 chore(nixops): set system libraries consistently on darwin (#3656) 2025-10-31 11:06:38 +01:00
David Barroso
c662d063a7 chore(nixops): bump go to 1.25.3 and nixpkgs due to CVEs (#3652) 2025-10-30 16:37:52 +01:00
David Barroso
b518132349 chore(nhost-js): regenerate types (#3648) 2025-10-29 12:50:22 +01:00
David BM
b677d3768f fix(dashboard): update SQL editor to use correct hasura migrations API URL (#3645) 2025-10-28 15:58:25 +01:00
David Barroso
51ec151752 feat(auth): added endpoints to retrieve and refresh oauth2 providers' tokens (#3614) 2025-10-28 12:50:30 +01:00
David Barroso
223322d654 fix(ci): run pull_request_target workflows against PR (#3646) 2025-10-28 11:51:55 +01:00
David Barroso
add2c20c95 chore(nixops): bump nhost-cli (#3641) 2025-10-28 10:05:47 +01:00
github-actions[bot]
961bc5feea release(cli): 1.34.4 (#3644)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-28 09:46:18 +01:00
David Barroso
0ca89974b9 fix(cli): update NEXT_PUBLIC_NHOST_HASURA_MIGRATIONS_API_URL correctly (#3643) 2025-10-28 09:44:14 +01:00
github-actions[bot]
e8d52859a3 release(cli): 1.34.3 (#3624)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-27 16:05:01 +01:00
David Barroso
67740ebe3d chore(cli): bump nhost/dashboard to 2.40.0 (#3629)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-27 16:03:07 +01:00
github-actions[bot]
d6f7b01aee release(dashboard): 2.40.0 (#3631)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-27 15:23:14 +01:00
dependabot[bot]
0fc65df78d chore(ci): bump actions/upload-artifact from 4 to 5 (#3638)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-27 09:50:12 +01:00
dependabot[bot]
52e3db7f61 chore(ci): bump actions/download-artifact from 5 to 6 (#3639)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-27 08:51:05 +01:00
David Barroso
235449d68c chore(docs): update guidelines on the use of AI for contributions (#3637) 2025-10-27 08:46:10 +01:00
Jason Overmier
323834d212 feat(dashboard): allow configuring CSP header (#3627)
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2025-10-23 12:05:04 +02:00
David Barroso
f7bd250f73 chore(ci): changed pull_request to pull_request_target for access to secrets (#3632) 2025-10-23 11:15:29 +02:00
David BM
579f9dbf31 chore(dashboard): various improvements to support ticket page (#3630)
Co-authored-by: robertkasza <robert.kasza@bishop-co.com>
2025-10-23 09:38:45 +02:00
github-actions[bot]
9f2b93d44b release(dashboard): 2.39.0 (#3600)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-22 10:59:29 +02:00
David Barroso
1aeef26ec6 feat(dashboard): move zendesk request to API route (#3628) 2025-10-22 10:54:42 +02:00
David Barroso
749bb4e637 feat(nhost-js): added various middlewares to work with headers and customizable createNhostClient (#3612) 2025-10-22 10:32:23 +02:00
David Barroso
accabc83f7 chore(cli): update schema (#3622) 2025-10-21 16:53:07 +02:00
David Barroso
8c127d7b6b chore(docs): fix broken link in openapi spec and minor mistakes in postmark integration info (#3621) 2025-10-21 12:32:44 +02:00
David BM
f9c614ef99 chore(deps): update Vite to address security advisory (#3620) 2025-10-21 12:18:29 +02:00
David Barroso
1d183f7fc4 feat(auth): encrypt TOTP secret (#3619) 2025-10-21 09:04:31 +02:00
github-actions[bot]
46e740f060 release(cli): 1.34.2 (#3603)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-20 14:30:47 +02:00
David Barroso
0d30ab4eec chore(cli): update schema (#3613) 2025-10-20 14:27:49 +02:00
github-actions[bot]
d5fd3cb59c release(services/auth): 0.42.4 (#3618)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-20 13:25:21 +02:00
David Barroso
f36d360b9e fix(auth): apply relationships on new projects (#3617) 2025-10-20 13:23:33 +02:00
github-actions[bot]
61af5087fd release(services/auth): 0.42.3 (#3608)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-20 12:42:03 +02:00
David Barroso
7429d8ae3f fix(auth): always apply expected metadata (#3616) 2025-10-20 12:37:52 +02:00
github-actions[bot]
8ce9705b17 release(services/storage): 0.8.2 (#3585)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-15 14:51:31 +02:00
David Barroso
5b53c568ad fix(ci): set config.custom_model_max_tokens (#3611) 2025-10-14 13:31:28 +02:00
David Barroso
24c5db943d feat(nhost-js): added pushChainFunction to functions and graphql clients (#3610) 2025-10-14 13:30:07 +02:00
David BM
ea87b81db6 chore(docs): add links to local development and cloud development (#3609)
Co-authored-by: robertkasza <robert.kasza@bishop-co.com>
2025-10-14 11:56:42 +02:00
robertkasza
226a22e322 fix(dashboard): Remove vite-plugin-dts (#3607) 2025-10-14 11:27:46 +02:00
David Barroso
9c58b4307a chore(storage): migrate to urfave and slog libraries (#3606) 2025-10-14 10:17:20 +02:00
robertkasza
7ecfa41790 fix(dashboard): Run audit and lint in dashboard (#3578) 2025-10-14 08:49:42 +02:00
David Barroso
2633747992 chore(cli): minor fix to download script when specifying version (#3602) 2025-10-13 15:26:04 +02:00
github-actions[bot]
3b107a386e release(services/auth): 0.42.2 (#3598)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-13 14:49:48 +02:00
David Barroso
b5ed48a832 chore(auth): add wget to docker image (#3601) 2025-10-13 14:45:58 +02:00
David BM
363730ab20 chore(dashboard): cleanup e2e remote schemas test before run (#3581) 2025-10-13 12:24:11 +02:00
robertkasza
9c77c4be51 fix(dashboard): fix flaky e2e tests (#3536) 2025-10-13 11:39:34 +02:00
github-actions[bot]
c7c6de5258 release(cli): 1.34.1 (#3577)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-13 09:52:42 +02:00
David Barroso
1e7f4df883 fix(cli): workaround os.Rename issues when src and dst are on different partitions (#3599) 2025-10-13 09:48:37 +02:00
David Barroso
0c8e5ac55f chore(docs): udpated README.md and CONTRIBUTING.md (#3587) 2025-10-13 09:04:28 +02:00
David Barroso
5b809f6ac9 chore(nhost-js): generate code from local API definitions (#3583) 2025-10-10 13:15:05 +02:00
David Barroso
0cadc0e5ba chore(auth): change some references to deprecated hasura-auth (#3584) 2025-10-10 12:36:42 +02:00
David Barroso
4c53f4a83b chore(auth): enabled CI (#3582) 2025-10-10 12:25:58 +02:00
David Barroso
9607e9fbad feat(auth): import service hasura-auth into services/auth (#3580) 2025-10-10 07:20:03 +02:00
David Barroso
19506d5dd8 fix and clean build after import 2025-10-09 16:49:44 +02:00
David Barroso
ac4132ec5d Merge branch 'auth-import' into auth 2025-10-09 16:15:14 +02:00
David Barroso
2e09723d70 Move hasura-auth files into services/auth subdirectory 2025-10-09 16:14:02 +02:00
David Barroso
25ef074a7f fix(cli): remove references to mcp-nhost (#3575) 2025-10-09 12:27:21 +02:00
github-actions[bot]
6ad1cd1900 release(cli): 1.34.0 (#3553)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-09 11:48:54 +02:00
David Barroso
5c5223d871 chore(cli): bump nhost/dashboard to 2.38.4 (#3539)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-09 11:39:23 +02:00
github-actions[bot]
00ef639455 release(dashboard): 2.38.4 (#3574)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-09 10:38:57 +02:00
David Barroso
a54da9c072 fix(dashboard): remove NODE_ENV from restricted env vars (#3573) 2025-10-09 10:36:25 +02:00
David Barroso
63edfa2600 feat(cli): MCP refactor and documentation prior to official release (#3571) 2025-10-09 08:55:10 +02:00
David Barroso
381baf2e51 feat(docs): added react urql guide (#3570) 2025-10-08 11:02:50 +02:00
dependabot[bot]
951ce168e8 chore(ci): bump github/codeql-action from 3 to 4 (#3569)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-08 08:34:39 +02:00
github-actions[bot]
be8f4e5b1b release(dashboard): 2.38.3 (#3563)
Co-authored-by: dbm03 <dbm03@users.noreply.github.com>
2025-10-07 15:03:40 +02:00
David BM
010573cc31 fix(dashboard): improve remote schema preview search (#3558) 2025-10-07 14:37:21 +02:00
David BM
629bbe7a78 fix(dashboard): remote schema edit graphql customizations, default value for root field namespace is empty (#3565) 2025-10-06 14:56:46 +02:00
Isaac Johnston
57a69c16dc feat: add Modica Group SMS provider support (#676) 2025-10-06 10:12:47 +02:00
David BM
166889be1b fix(dashboard): show paused banner in Run page (#3564) 2025-10-06 10:04:30 +02:00
David BM
c80f6292c6 fix(dashboard): show paused banner in remote schemas/database page if project is paused (#3557) 2025-10-06 08:59:49 +02:00
David Barroso
5c7a6788b4 feat(cli): mcp: added support for environment variables in the configuration (#3556) 2025-10-03 10:24:38 +02:00
David Barroso
6ae4e17ffe feat(cli): mcp: move configuration to .nhost folder and integrate cloud credentials (#3555) 2025-10-03 10:17:41 +02:00
David Barroso
515fde79a3 chore(nixops): update nhost-cli (#3554) 2025-10-02 16:59:16 +02:00
David Barroso
545d0e33d9 feat(cli): added mcp server functionality from mcp-nhost (#3550) 2025-10-02 14:53:55 +02:00
github-actions[bot]
9d1853742e release(cli): 1.33.0 (#3547)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-02 14:32:21 +02:00
David Barroso
c0beb07b77 chore(cli): update certs (#3552) 2025-10-02 14:29:55 +02:00
David Barroso
3a79db6277 fix(cli): fix breaking change in go-getter dependency (#3551) 2025-10-02 14:03:00 +02:00
David Barroso
3378739967 fix(cli): disable tls on AUTH_SERVER_URL when auth uses custom port (#3549) 2025-10-02 11:13:05 +02:00
David Barroso
e31ac82a55 fix(examples/docker-compose): added missing .env.example (#3548) 2025-10-02 10:55:26 +02:00
David Barroso
bdd88161c6 feat(cli): migrate from urfave/v2 to urfave/v3 (#3545) 2025-10-02 09:13:35 +02:00
Nuno Pato
21856df37b fix: allow adding first security key when claim mode is required (#677)
### **PR Type**
Bug fix, Tests, Enhancement


___

### **Description**
- Pass request path into elevated claim verifier

- Bypass elevated claim for first security key add/verify

- Extract URL.Path in MiddlewareFunc before verify

- Add tests for required mode bypass scenarios


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Incoming HTTP request"] -- "extract path" --> B["MiddlewareFunc"]
  B -- "pass path & token" --> C["verifyElevatedClaim"]
  C -- "mode=required & no keys & add/verify" --> D["allow request"]
  C -- "else" --> E["enforce elevated claim"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>jwt.go</strong><dd><code>Support requestPath in
elevated claim checks</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/jwt.go

<ul><li>Added <code>requestPath</code> parameter to
<code>verifyElevatedClaim</code><br> <li> Moved userID parse before mode
checks<br> <li> Bypass claim when required mode & no keys on add/verify
endpoints<br> <li> Extract <code>Request.URL.Path</code> in
<code>MiddlewareFunc</code></ul>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/677/files#diff-2b63f932811bd25d3716aca99c9a61a691d412f94ab1ce61d85768deb84d3dd9">+23/-12</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>jwt_test.go</strong><dd><code>Add tests for bypassing
elevated claim</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

go/controller/jwt_test.go

<ul><li>Imported <code>net/url</code> for URL path setup<br> <li> Added
tests for add/verify bypass in required mode<br> <li> Mocked
<code>CountSecurityKeysUser</code> expectations</ul>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/677/files#diff-1bb7d62cd5e7e79b93a2ac196e721568eb7356b61e3751d2ef4781f5a725ef1d">+89/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___

---------

Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2025-10-01 11:06:44 +00:00
github-actions[bot]
17e8acb368 release(cli): 1.32.2 (#3544)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-10-01 08:40:31 +02:00
David Barroso
a2bc1fee6f chore(cli): remove hasura- prefix from auth/storage images (#3538) 2025-10-01 08:33:06 +02:00
github-actions[bot]
ba2ac461e1 release(dashboard): 2.38.2 (#3541)
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2025-09-30 17:01:40 +02:00
David Barroso
183bd83ad7 fix: use postgres crypt to handle OTP hashing (#674)
### **PR Type**
Enhancement, Bug fix


___

### **Description**
- Add configurable SMS provider flag

- Simplify OTP generation and storage

- Update SQL to cryptographically verify OTP

- Refactor and export password hash verifier


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["CLI --sms-provider flag"]
  B["getSMS initializes provider"]
  C["Dev or Twilio backend"]
  D["SendVerificationCode generates OTP"]
  E["DB stores and verifies OTP using crypt"]
  A -- "provides flag" --> B
  B -- "selects provider" --> C
  C -- "sends code" --> D
  D -- "calls DB update" --> E
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>9
files</summary><table>
<tr>
<td><strong>email.go</strong><dd><code>Add SMS provider switch in
getSMS</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-a6364ed092c8bd789262322ec1e0108c274323462a0af0b7c7dd10a07f0bc449">+20/-11</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>secrets.go</strong><dd><code>Export password hash
verifier</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-97ceb71f0d904089c77f432c1eb00e9b2b202b5b4ec191a52287386f06f0221b">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>sign_in_email_password.go</strong><dd><code>Use exported
VerifyHashPassword</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-c10b97a61def73058ca42e90bcdd6eb373637816f1c2eb05f448887abea0c996">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>sign_in_otp_email.go</strong><dd><code>Introduce generateOTP
function</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-ef51144d6b45769b4ac4e5bbe0531a8cc235ef35c8d44a655ec689c8a81a45a0">+13/-1</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>dev.go</strong><dd><code>Add Dev SMS provider
implementation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-875168f3184f1535f1a9893cd1c9f716e546b99057f4ce170b934d5ae661cac9">+32/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>sms.go</strong><dd><code>Simplify SMS OTP generation
logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-5c133e946d3d4678c97b6d28dfe7985b8f2b87a3f1fc26385bf07413e9508551">+13/-20</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>twilio_sms.go</strong><dd><code>Remove OTP args in TwilioSMS
constructor</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-c61a03d180f37c02b5dfc5224be8d2cbf8511dd6782153a76d09d9ce0ac9eaf6">+0/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>sign_up_email_password.go</strong><dd><code>Remove OtpHash,
set empty Otp field</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-21603d0151e49e6bf3da5747febc7d63b05501ef9c49559202b906faba64809a">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>sign_in_passwordless_email.go</strong><dd><code>Set empty
Otp on signup with ticket</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-75955329f33dc13dc34388566d2874aaf09cda6ed864be1775e04db48bd3029b">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>2 files</summary><table>
<tr>
<td><strong>serve.go</strong><dd><code>Add sms-provider CLI
flag</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-a900f3187c126bacf5c9c5b1745b5d14bc583c01ab8f1ca84ae449751c224b68">+8/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>.golangci.yaml</strong><dd><code>Add goconst linter for
tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-9917ddc9f1c3304218f7269265b746d997c5c0615478177b5fceecd33ef47cb5">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Cleanup</strong></td><td><details><summary>3
files</summary><table>
<tr>
<td><strong>workflows_tickets.go</strong><dd><code>Remove legacy OTP
generator and hasher</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-a4d16eaab24ba5b8c7b93fb112b8dd7a7ff7a70308e2d334b1ba6ba38df8b1ee">+0/-27</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>controller.go</strong><dd><code>Remove obsolete OTP
interface method</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-68eba6c5b3be94c2016a5c821351ad07c60e395226594ff744901f759e22af15">+0/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>controller.go</strong><dd><code>Remove mocks for phone OTP
method</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-f1b1f168b0924b023c571d6274d53defef472a872f5fee4de1c4ae78959cc327">+0/-30</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Bug
fix</strong></td><td><details><summary>3 files</summary><table>
<tr>
<td><strong>query.sql.go</strong><dd><code>Update
GetUserByPhoneNumberAndOTP crypt logic</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-442fde6e20ac506fb6bc13c00a7374ee9c33b183ffda72db4e49e1b013cd4cde">+17/-11</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>query.sql</strong><dd><code>Align OTP SQL with crypt-based
check</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-c19dd96472c44a7389d4d1f72e0a1879df1e06e8e4d333ca3cb6b6dfbe3083ef">+10/-4</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>sign_in_passwordless_sms.go</strong><dd><code>Use raw OTP
instead of stored hash</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-27f138a5979edb2e311a55e08f902030c7c1ad35ab4600c8e0b41b4c03a70b8d">+9/-13</a>&nbsp;
&nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>cli.md</strong><dd><code>Document --sms-provider
option</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-27c8c22b45605a0ddf42ce8017b6b2a68cb3b10534c18bf4a781e230d7b92361">+3/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>2
files</summary><table>
<tr>
<td><strong>sign_in_passwordless_sms_test.go</strong><dd><code>Update
tests for OTP vs hash</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-b51c9ca27064e2579444e6eecca4908c5c5f0f3d567b9a125406ca07f00354a7">+36/-36</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>sign_up_email_password_test.go</strong><dd><code>Update
tests to expect Otp field</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-2cd7cf89bd4d3e6fdfacd10d66740c02196b2bee4f9ec44409c4ad6a77d53685">+6/-6</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Additional
files</strong></td><td><details><summary>7 files</summary><table>
<tr>
  <td><strong>elevate_webauthn_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-47ef225c96c0aa63c67e926b18c922a14e7ccbd71145ffe646da196d3cc13880">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>refresh_token_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-7c06d2d7bbfc744dd9feaa835b3ff8f2856304325c0fe45035bd9c655b2086d8">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>sign_in_otp_email_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-aff8747c582d84badc6a27e1f2f88dd91761ca1901f983908aab20f02c7eb5e3">+6/-6</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>sign_in_passwordless_email_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-f8cb52277c756ae8dfb128d6cf53df90a0c8e3506fe8402eb9d77a7658138678">+6/-6</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>sign_in_provider_callback_get_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-b46929201c1137439ed7682d5965a96d427110015ef31eb50fd3c86de3814d55">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>verify_elevate_webauthn_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-8f96cae3346b1cd7cddadcb3d588a05dcf51bf7d814fa9ae6817ed776a6ccbca">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>gocmp.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/674/files#diff-27aaac461c10f73569f7c93a2c299818d040c491f1fbd5279c682f5488dc65ed">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

</details>

___
2025-09-01 12:58:59 +02:00
David Barroso
ccbc12f952 chore: update from urface/cli/v2 to v3 and fix a few outdated files (#672)
### **PR Type**
Enhancement


___

### **Description**
- Migrate from urfave/cli/v2 to v3 with API changes

- Update CLI flag configuration to use Sources instead of EnvVars

- Refactor function signatures to use cli.Command instead of cli.Context

- Add CLI documentation generation command


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["urfave/cli/v2"] --> B["urfave/cli/v3"]
  B --> C["Updated Flag Configuration"]
  B --> D["Function Signature Changes"]
  B --> E["CLI Documentation Generation"]
  C --> F["EnvVars → Sources"]
  D --> G["cli.Context → cli.Command"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>10
files</summary><table>
<tr>
<td><strong>config.go</strong><dd><code>Update config functions for
cli/v3 compatibility</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-6ed50c9d309f6e7cf03742253995dfc65ae67702ae9c4aeb650b24a9b87cf377">+46/-46</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>db.go</strong><dd><code>Refactor database pool creation for
new CLI</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-644e121bc5cd81a5aeca411a3b94f595b16b01f59917f5d2bf604a659e73ccdd">+5/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>email.go</strong><dd><code>Update email configuration and
error handling</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-a6364ed092c8bd789262322ec1e0108c274323462a0af0b7c7dd10a07f0bc449">+27/-27</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>enum.go</strong><dd><code>Simplify enum value handling and
remove helpers</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-0172565db430c88e75447650002d7f88f34d425f694332142dd16350d79c19d3">+8/-29</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>jwt_getter.go</strong><dd><code>Update JWT getter
configuration for cli/v3</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-7e1ff4031caa178d9066e3eb8e9055636a219fc8517cac9bcf34c63033586006">+11/-11</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>logger.go</strong><dd><code>Refactor logging configuration
and flag processing</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-94894c27740fc35b5b4808f22d4a897030db993d1d9343221de51e505594612c">+20/-12</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>migrations.go</strong><dd><code>Update migration functions
for new CLI interface</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-8902ab7f0135be38b5d4c9e50105df8c79a3f7c4ce73c6006ed9cc751d652a7b">+10/-10</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>oauth.go</strong><dd><code>Update OAuth provider
configuration functions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-82367f3f24a804b47ced852a588881c0846894bc0edf1ca3bdc6aa5aef7c37b2">+96/-94</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>serve.go</strong><dd><code>Major CLI flag migration and
server configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-a900f3187c126bacf5c9c5b1745b5d14bc583c01ab8f1ca84ae449751c224b68">+218/-218</a></td>

</tr>

<tr>
<td><strong>main.go</strong><dd><code>Add CLI documentation generation
and update app structure</code></dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-2873f79a86c0d8b3335cd7731b0ecf7dd4301eb19a82ef7a1cba7589b5252261">+57/-9</a>&nbsp;
&nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Miscellaneous</strong></td><td><details><summary>5
files</summary><table>
<tr>
<td><strong>add_security_key_test.go</strong><dd><code>Add nolintlint
directive to test constant</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-e4bf9e60809ed847fc55d2859540ba867f91b5534f5ea339d689f5a80c832c10">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>elevate_webauthn_test.go</strong><dd><code>Add nolintlint
directive to test constant</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-47ef225c96c0aa63c67e926b18c922a14e7ccbd71145ffe646da196d3cc13880">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>sign_in_webauthn_test.go</strong><dd><code>Add nolintlint
directive to test constant</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-a920a6aad3937fe5b208622b01177a4b04a182240e113b6fd1a231b12e7ed20f">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>index.html</strong><dd><code>Remove WebAuthn test HTML
file</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-0eb547304658805aad788d320f10bf1f292797b5e6d745a3bf617584da017051">+0/-194</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>audit-ci.jsonc</strong><dd><code>Remove Node.js audit
configuration file</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-4ede69da2a1704e53e08b8d647a315c202f037cc9277f16c94176d9622d261c6">+0/-7</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>7
files</summary><table>
<tr>
<td><strong>CLAUDE.md</strong><dd><code>Update development guide title
and content</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7">+51/-42</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>DEVELOPERS.md</strong><dd><code>Remove outdated Node.js
development guide</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-bd017515eb79a7fb7569b1d15e8963ea380123d4fdf779978dd4b3ab7500fd10">+0/-77</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>README.md</strong><dd><code>Update installation and
configuration documentation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5">+11/-9</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>SECURITY.md</strong><dd><code>Update security vulnerability
reporting URL</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-f6ed156e4bf5c791680662464b94ea5d753f219ee816b385f67870e2c0d7d4c7">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>cli.md</strong><dd><code>Add comprehensive CLI
documentation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-27c8c22b45605a0ddf42ce8017b6b2a68cb3b10534c18bf4a781e230d7b92361">+481/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>configuration.md</strong><dd><code>Update configuration
documentation references</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-17ed18489a956f326ec0fe4040850c5bc9261d4631fb42da4c52891d74a59180">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>environment-variables.md</strong><dd><code>Remove outdated
environment variables documentation</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-24284b831e81f770335038e710187e2feb0c7c3f46148c31fea108516ce1ae59">+0/-127</a>&nbsp;
</td>

</tr>

</table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>2
files</summary><table>
<tr>
<td><strong>go.mod</strong><dd><code>Update dependencies for
urfave/cli/v3 migration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6">+7/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>go.sum</strong><dd><code>Update dependency checksums for new
versions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/672/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63">+6/-8</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

</details>

___
2025-09-01 12:35:57 +02:00
David Barroso
d070758ce3 fix: do not return specific errors on unauthenticated endpoints to avoid account enumeration (#671)
### **PR Type**
Bug fix


___

### **Description**
- Prevent account enumeration in password reset endpoint

- Return success response for all invalid email scenarios

- Update error handling to mask user existence information

- Modify tests to expect consistent success responses


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Password Reset Request"] --> B["Email Validation"]
  B --> C["User Lookup"]
  C --> D["Error Handling"]
  D --> E["Success Response (Always)"]
  F["Previous: Specific Errors"] --> G["New: Generic Success"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>

<summary><strong>send_password_reset_email.go</strong><dd><code>Implement
anti-enumeration logic in password reset</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/send_password_reset_email.go

<ul><li>Import <code>errors</code> package for error type checking<br>
<li> Return success response instead of error for invalid emails<br>
<li> Add switch statement to handle internal server errors
separately<br> <li> Mask user existence information in all non-critical
error cases</ul>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/671/files#diff-c50446fbf98e62efd5959b992a8bf642476201e02b616fcc5e9959276e357e4a">+6/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>

<summary><strong>send_password_reset_email_test.go</strong><dd><code>Update
tests for anti-enumeration behavior</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

go/controller/send_password_reset_email_test.go

<ul><li>Update test expectations from error responses to success
responses<br> <li> Remove assertions for specific error messages and
status codes<br> <li> Modify four test cases to expect consistent OK
responses</ul>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/671/files#diff-50434a684676cacc5a156338b36a182c5acb03b3f88029d78289f311401c4741">+4/-20</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-09-01 08:25:24 +02:00
David Barroso
3672af6f2e feat: added EntraID in favor of AzureAD and restored old behavior for AzureAD (#668)
### **PR Type**
Enhancement


___

### **Description**
- Add EntraID OAuth provider as replacement for deprecated AzureAD

- Deprecate AzureAD provider with warning message

- Fix OAuth profile validation for empty provider user IDs

- Update API types and OpenAPI specification


___

### Diagram Walkthrough


```mermaid
flowchart LR
  AzureAD["AzureAD Provider (deprecated)"] -- "replaced by" --> EntraID["EntraID Provider"]
  EntraID --> API["API Types Updated"]
  EntraID --> Migration["Database Migration"]
  EntraID --> Validation["Profile Validation"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>9
files</summary><table>
<tr>
<td><strong>server.gen.go</strong><dd><code>Update generated API server
with EntraID support</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+159/-159</a></td>

</tr>

<tr>
<td><strong>types.gen.go</strong><dd><code>Add EntraID constants to
generated types</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+4/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>oauth.go</strong><dd><code>Add EntraID provider
configuration and deprecation warning</code></dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-82367f3f24a804b47ced852a588881c0846894bc0edf1ca3bdc6aa5aef7c37b2">+18/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>serve.go</strong><dd><code>Add EntraID CLI flags and
configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-a900f3187c126bacf5c9c5b1745b5d14bc583c01ab8f1ca84ae449751c224b68">+41/-1</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>azuread.go</strong><dd><code>Simplify AzureAD provider
implementation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-206160b7cc0b284900057e9804c7ff57e757be1c4cb9d2b10fefbcafb4a2175f">+8/-10</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>entraid.go</strong><dd><code>Implement new EntraID OAuth
provider</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-c0398837d3ac23ce780549e0c991cee331b013048d5b86d1c66b359f3a735e51">+70/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>scopes.go</strong><dd><code>Add default scopes for EntraID
provider</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-9007412d3f446ebcafd71f4c653bae37b99757ed41a2c08a5bacd78f2f644df2">+4/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>00018_entraid-provider.down.sql</strong><dd><code>Add
EntraID provider migration rollback</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-4f4dcec8d023a9e6a961dd636b84c80b79264116e9971db83596edd40e6624a2">+4/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>00018_entraid-provider.up.sql</strong><dd><code>Add EntraID
provider database migration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-793c1d93860ab26c9c19a0f16d812753861db914456881a758907952f3db8ac1">+8/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Formatting</strong></td><td><details><summary>2
files</summary><table>
<tr>
<td><strong>elevate_webauthn_test.go</strong><dd><code>Fix linter
comment for credential ID constant</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-47ef225c96c0aa63c67e926b18c922a14e7ccbd71145ffe646da196d3cc13880">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>sign_in_webauthn_test.go</strong><dd><code>Fix linter
comment for credential ID constant</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-a920a6aad3937fe5b208622b01177a4b04a182240e113b6fd1a231b12e7ed20f">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Bug
fix</strong></td><td><details><summary>2 files</summary><table>
<tr>
<td><strong>sign_in_provider_callback_get.go</strong><dd><code>Add
validation for empty provider user ID</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-3ce523d5652c343d2bdb3dc0f4e3ec54888b43c7e348d4b7c59a9139c1aecefe">+5/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>workflows.go</strong><dd><code>Add validation for empty
provider user ID</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-6aaacc47584f1edde5a01051611a7baffc583fc32b48df6d7fee39afa16a65cb">+5/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>.golangci.yaml</strong><dd><code>Update linter configuration
for issue limits</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-9917ddc9f1c3304218f7269265b746d997c5c0615478177b5fceecd33ef47cb5">+3/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>openapi.yaml</strong><dd><code>Add EntraID to OpenAPI
specification</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/668/files#diff-6e0796423f18517e4c44819722b39c2c5ab9999f9dfb37598288ea041d1db2b0">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

</details>

___
2025-08-26 15:41:48 +02:00
dependabot[bot]
19de48095d chore: bump actions/download-artifact from 4 to 5 (#665)
### **User description**
Bumps
[actions/download-artifact](https://github.com/actions/download-artifact)
from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/download-artifact/releases">actions/download-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/download-artifact/pull/407">actions/download-artifact#407</a></li>
<li>BREAKING fix: inconsistent path behavior for single artifact
downloads by ID by <a
href="https://github.com/GrantBirki"><code>@​GrantBirki</code></a> in <a
href="https://redirect.github.com/actions/download-artifact/pull/416">actions/download-artifact#416</a></li>
</ul>
<h2>v5.0.0</h2>
<h3>🚨 Breaking Change</h3>
<p>This release fixes an inconsistency in path behavior for single
artifact downloads by ID. <strong>If you're downloading single artifacts
by ID, the output path may change.</strong></p>
<h4>What Changed</h4>
<p>Previously, <strong>single artifact downloads</strong> behaved
differently depending on how you specified the artifact:</p>
<ul>
<li><strong>By name</strong>: <code>name: my-artifact</code> → extracted
to <code>path/</code> (direct)</li>
<li><strong>By ID</strong>: <code>artifact-ids: 12345</code> → extracted
to <code>path/my-artifact/</code> (nested)</li>
</ul>
<p>Now both methods are consistent:</p>
<ul>
<li><strong>By name</strong>: <code>name: my-artifact</code> → extracted
to <code>path/</code> (unchanged)</li>
<li><strong>By ID</strong>: <code>artifact-ids: 12345</code> → extracted
to <code>path/</code> (fixed - now direct)</li>
</ul>
<h4>Migration Guide</h4>
<h5> No Action Needed If:</h5>
<ul>
<li>You download artifacts by <strong>name</strong></li>
<li>You download <strong>multiple</strong> artifacts by ID</li>
<li>You already use <code>merge-multiple: true</code> as a
workaround</li>
</ul>
<h5>⚠️ Action Required If:</h5>
<p>You download <strong>single artifacts by ID</strong> and your
workflows expect the nested directory structure.</p>
<p><strong>Before v5 (nested structure):</strong></p>
<pre lang="yaml"><code>- uses: actions/download-artifact@v4
  with:
    artifact-ids: 12345
    path: dist
# Files were in: dist/my-artifact/
</code></pre>
<blockquote>
<p>Where <code>my-artifact</code> is the name of the artifact you
previously uploaded</p>
</blockquote>
<p><strong>To maintain old behavior (if needed):</strong></p>
<pre lang="yaml"><code>&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="634f93cb29"><code>634f93c</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/download-artifact/issues/416">#416</a>
from actions/single-artifact-id-download-path</li>
<li><a
href="b19ff43027"><code>b19ff43</code></a>
refactor: resolve download path correctly in artifact download tests
(mainly ...</li>
<li><a
href="e262cbee4a"><code>e262cbe</code></a>
bundle dist</li>
<li><a
href="bff23f9308"><code>bff23f9</code></a>
update docs</li>
<li><a
href="fff8c148a8"><code>fff8c14</code></a>
fix download path logic when downloading a single artifact by id</li>
<li><a
href="448e3f862a"><code>448e3f8</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/download-artifact/issues/407">#407</a>
from actions/nebuk89-patch-1</li>
<li><a
href="47225c44b3"><code>47225c4</code></a>
Update README.md</li>
<li>See full diff in <a
href="https://github.com/actions/download-artifact/compare/v4...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/download-artifact&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>


___

### **PR Type**
Other


___

### **Description**
- Update GitHub Actions dependency to latest version

- Bump actions/download-artifact from v4 to v5

- Maintain existing workflow functionality


___



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>wf_docker_push_image.yaml</strong><dd><code>Update
download-artifact action version</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/wf_docker_push_image.yaml

- Updated actions/download-artifact from v4 to v5


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/665/files#diff-a0b87bcebe9e143aeb58a882e2bcf531709c6950d6845ababf624eb125eed691">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-06 10:29:22 +02:00
David Barroso
d064a2fe23 fix: do not redirect to invalid redirectTo on error to (#664)
If an attacker requests an invalid redirectTo the service correctly
validates the value and throws on error. However, in the case of the
/verify endpoint we redirect to the very same redirectTo that we just
invalidated indicating the redirectTo was invalid.

### **PR Type**
Bug fix


___

### **Description**
- Fix redirect URL validation in ticket verification

- Prevent redirection to invalid/malicious URLs on error

- Use client URL instead of invalid redirectTo parameter

- Add test case for wrong redirect URL scenario


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Invalid redirectTo"] --> B["Validation Error"]
  B --> C["Use ClientURL instead"]
  C --> D["Safe Redirect"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>verify_ticket.go</strong><dd><code>Fix redirect URL
validation error handling</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/verify_ticket.go

<ul><li>Replace invalid <code>redirectTo</code> with
<code>ctrl.config.ClientURL</code> on validation <br>error<br> <li>
Prevent potential security vulnerability from malicious redirect
URLs</ul>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/664/files#diff-7a36d63db0b247e393d4e7a9a2ff52be673c33aa2a4e40af06f1a4445edb3c32">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>verify_ticket_test.go</strong><dd><code>Add test for
invalid redirect URL handling</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/verify_ticket_test.go

<ul><li>Add test case for "wrong redirect URL" scenario<br> <li> Verify
proper error handling with malicious redirect URL<br> <li> Test expected
redirect to client URL with appropriate error message</ul>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/664/files#diff-0c15b83d87b39bbbb4175ee401fef063bd686677d110c89822ddc287c5f0e57e">+31/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

</details>

___
2025-08-05 13:06:38 +02:00
David Barroso
c618a7a359 chore: update dependencies (#663)
### **PR Type**
Enhancement


___

### **Description**
- Update Go dependencies to latest versions

- Improve error handling and logging consistency

- Add context parameter to SMS verification methods

- Refactor linter configuration to version 2 format


___

### Diagram Walkthrough


```mermaid
flowchart LR
  A["Dependencies"] --> B["Go Modules"]
  A --> C["Linter Config"]
  D["Error Handling"] --> E["Context Logging"]
  D --> F["SMS Interface"]
  B --> G["Updated Versions"]
  C --> H["Version 2 Format"]
  E --> I["Consistent Patterns"]
  F --> J["Context Parameter"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody></tr></tbody></table>

</details>

___
2025-08-01 12:10:53 +02:00
Sumanth Chinthagunta
6c3ed7ba55 feat: apply defaults for customClaims (#661) 2025-07-29 10:46:01 +02:00
David Barroso
c575700f96 fix: return 401 if refreshtoken is consumed in flight (#662)
### **PR Type**
Bug fix


___

### **Description**
- Return 401 error if refresh token is already used

- Improve error handling for refresh token endpoint

- Add specific logging for invalid refresh token usage

- Prevent 500 error for consumed refresh tokens


___

### **Changes diagram**

```mermaid
flowchart LR
  A["Refresh token request received"] -- "UpdateSession fails with ErrInvalidRefreshToken" --> B["Log error: invalid refresh token"]
  B -- "Return 401 Unauthorized" --> C["Client receives 401"]
  A -- "Other error" --> D["Log error: updating session"]
  D -- "Return 500 Internal Server Error" --> E["Client receives 500"]
```


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>refresh_token.go</strong><dd><code>Handle consumed
refresh tokens with 401 response</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/refresh_token.go

<li>Add specific check for <code>ErrInvalidRefreshToken</code> after
session update<br> <li> Log and return 401 Unauthorized if refresh token
is already used<br> <li> Retain generic error handling for other errors


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/662/files#diff-16ffb1ba5f2e8238f2fdd946bcd00f768c512125d87ad9b9878a1530a5bd4129">+5/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-07-21 07:44:32 +02:00
David Barroso
736fc8584f fix: define properly query parameters (#660)
### **PR Type**
Bug fix, Enhancement


___

### **Description**
- Fix handling of `allowedRoles` and `metadata` query parameters.

- Update OpenAPI spec for correct query parameter definitions.

- Parse `metadata` as JSON-encoded string in API handler.

- Update tests to use JSON string for `metadata`.


___

### **Changes diagram**

```mermaid
flowchart LR
  openapi["OpenAPI spec (openapi.yaml)"]
  server["Server handler (server.gen.go)"]
  types["API types (types.gen.go)"]
  tests["SignInProvider tests (sign_in_provider_test.go)"]

  openapi -- "Clarify allowedRoles/metadata param types" --> server
  openapi -- "Clarify allowedRoles/metadata param types" --> types
  server -- "Parse metadata as JSON string" --> types
  types -- "Update Metadata docstring" --> tests
  tests -- "Test metadata as JSON string" --> server
```


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>openapi.yaml</strong><dd><code>Update OpenAPI spec for
allowedRoles and metadata query params</code></dd></summary>
<hr>

docs/openapi.yaml

<li>Add <code>style: form</code> and <code>explode: false</code> for
<code>allowedRoles</code>.<br> <li> Change <code>metadata</code> to a
JSON-encoded string in query parameters.<br> <li> Update
<code>metadata</code> description and schema to reflect JSON encoding.


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/660/files#diff-6e0796423f18517e4c44819722b39c2c5ab9999f9dfb37598288ea041d1db2b0">+11/-7</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Bug fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>server.gen.go</strong><dd><code>Fix and parse
allowedRoles/metadata query parameters in handler</code></dd></summary>
<hr>

go/api/server.gen.go

<li>Fix <code>allowedRoles</code> to not require parameter and not
explode.<br> <li> Parse <code>metadata</code> query param as JSON string
and unmarshal into map.<br> <li> Improve error handling for invalid
<code>metadata</code> JSON.


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/660/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+177/-169</a></td>

</tr>
</table></td></tr><tr><td><strong>Documentation</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>types.gen.go</strong><dd><code>Clarify Metadata field
as JSON-encoded string</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/types.gen.go

- Update `Metadata` field comment to specify JSON-encoded string.


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/660/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>sign_in_provider_test.go</strong><dd><code>Update test
to use JSON string for metadata param</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/sign_in_provider_test.go

- Update test to provide `metadata` as JSON string.


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/660/files#diff-a0673feaf4e6575a6193d136e11b1a0c87cc33fb1ca1eb78ebd2d2f3d9ad8f94">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

---------

Co-authored-by: Nuno Pato <nunopato@gmail.com>
2025-07-10 14:11:04 +00:00
David Barroso
ea1537122a chore: improvements to openapi schema (#659) 2025-07-08 11:21:43 +02:00
David Barroso
2a65455d44 fix: github: extract email from /emails endpoint (#658)
### **PR Type**
Bug fix


___

### **Description**
- Fix GitHub email extraction to use `/user/emails` endpoint

- Update profile fetching to handle new email structure

- Improve error handling for missing email addresses

- Refactor response body reading and JSON decoding


___

### **Changes diagram**

```mermaid
flowchart LR
  A["fetchOAuthProfile reads response body"] -- "Unmarshal JSON" --> B["result struct"]
  C["GetProfile fetches user profile"] -- "calls /user" --> D["gitHubUser"]
  C -- "calls /user/emails" --> E["gitHubEmail"]
  E -- "extracts email & verified" --> F["oidc.Profile"]
  D -- "other fields" --> F
```


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>fetch.go</strong><dd><code>Refactor OAuth profile
fetching and error handling</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

go/providers/fetch.go

<li>Refactored to read response body before JSON unmarshalling<br> <li>
Improved error messages for body reading and unmarshalling


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/658/files#diff-5a0f72f832df09988c078d201fd82c44b360b270ff7f54b23b2af380efca9e8d">+9/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>github.go</strong><dd><code>Fix GitHub email extraction
and improve error handling</code>&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/providers/github.go

<li>Added call to <code>/user/emails</code> endpoint for email
extraction<br> <li> Introduced <code>gitHubEmail</code> struct for email
parsing<br> <li> Updated profile construction to use verified email<br>
<li> Added error handling for missing email addresses


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/658/files#diff-ab1c065b25657f32b46729b866d6ffe16808879211796a86e61f38e577c35510">+23/-2</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-07-01 15:36:02 +02:00
David Barroso
c42e65b54f fix: minor backward compatibility changes (#657)
### **PR Type**
Bug fix, Enhancement


___

### **Description**
- Ensure backward compatibility for Postgres `sslmode` in migrations.

- Use correct connection flag for migration command.

- Add legacy `/healthz` endpoints for API prefix compatibility.


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>postgres.go</strong><dd><code>Ensure Postgres URL
includes sslmode for migrations</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

go/migrations/postgres.go

<li>Add logic to append <code>sslmode=disable</code> if missing in
Postgres URL.<br> <li> Enhance migration function for backward
compatibility.


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/657/files#diff-a46a7f6d67414014968d95e99e60baf0b0827f7a5ec785a12f9245ddc8d5854b">+7/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>serve.go</strong><dd><code>Add legacy /healthz
endpoints for backward compatibility</code>&nbsp; </dd></summary>
<hr>

go/cmd/serve.go

<li>Add <code>/healthz</code> GET and HEAD endpoints without API prefix
for <br>compatibility.<br> <li> Maintain legacy health endpoints
alongside prefixed ones.


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/657/files#diff-a900f3187c126bacf5c9c5b1745b5d14bc583c01ab8f1ca84ae449751c224b68">+10/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Bug fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>migrations.go</strong><dd><code>Use correct flag for
migration connection string</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/cmd/migrations.go

<li>Use <code>flagPostgresMigrationsConnection</code> instead of
<br><code>flagPostgresConnection</code>.<br> <li> Fix migration command
to use correct connection string.


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/657/files#diff-8902ab7f0135be38b5d4c9e50105df8c79a3f7c4ce73c6006ed9cc751d652a7b">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-07-01 12:36:09 +02:00
dependabot[bot]
fa456fb7b1 chore: bump nixbuild/nix-quick-install-action from 31 to 32 (#656)
### **User description**
Bumps
[nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action)
from 31 to 32.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/releases">nixbuild/nix-quick-install-action's
releases</a>.</em></p>
<blockquote>
<h2>nixbuild/nix-quick-install-action@v32</h2>
<h2>Changes</h2>
<ul>
<li>
<p>Bump minor Nix versions: 2.24.14 -&gt; 2.24.15, 2.26.3 -&gt; 2.26.4,
2.28.3 -&gt; 2.28.4, 2.29.1 -&gt; 2.29.1. This fixes the security
vulnerabilities
reported in <a
href="https://discourse.nixos.org/t/security-advisory-privilege-escalations-in-nix-lix-and-guix/">https://discourse.nixos.org/t/security-advisory-privilege-escalations-in-nix-lix-and-guix/</a>.</p>
</li>
<li>
<p>Bump default Nix version: 2.29.0 -&gt; 2.29.1</p>
</li>
</ul>
<h2>Supported Nix Versions on x86_64-linux runners</h2>
<ul>
<li>2.29.1</li>
<li>2.28.4</li>
<li>2.26.4</li>
<li>2.24.15</li>
<li>2.3.18</li>
</ul>
<h2>Supported Nix Versions on aarch64-linux runners</h2>
<ul>
<li>2.29.1</li>
<li>2.28.4</li>
<li>2.26.4</li>
<li>2.24.15</li>
</ul>
<h2>Supported Nix Versions on x86_64-darwin runners</h2>
<ul>
<li>2.29.1</li>
<li>2.28.4</li>
<li>2.26.4</li>
<li>2.24.15</li>
<li>2.3.18</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE">nixbuild/nix-quick-install-action's
changelog</a>.</em></p>
<blockquote>
<p>v32</p>
<h2>Changes</h2>
<ul>
<li>
<p>Bump minor Nix versions: 2.24.14 -&gt; 2.24.15, 2.26.3 -&gt; 2.26.4,
2.28.3 -&gt; 2.28.4, 2.29.1 -&gt; 2.29.1. This fixes the security
vulnerabilities
reported in <a
href="https://discourse.nixos.org/t/security-advisory-privilege-escalations-in-nix-lix-and-guix/">https://discourse.nixos.org/t/security-advisory-privilege-escalations-in-nix-lix-and-guix/</a>.</p>
</li>
<li>
<p>Bump default Nix version: 2.29.0 -&gt; 2.29.1</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="63ca48f939"><code>63ca48f</code></a>
Release v32</li>
<li><a
href="561f57d8ff"><code>561f57d</code></a>
Fix Nix versions</li>
<li><a
href="fb259be9d0"><code>fb259be</code></a>
Fix Nix versions</li>
<li><a
href="78439c724d"><code>78439c7</code></a>
Update Nix versions (<a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/69">#69</a>)</li>
<li><a
href="b0bad79cb8"><code>b0bad79</code></a>
Fix version</li>
<li><a
href="c3bd2b7f38"><code>c3bd2b7</code></a>
Update README and workflows for v31</li>
<li>See full diff in <a
href="https://github.com/nixbuild/nix-quick-install-action/compare/v31...v32">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nixbuild/nix-quick-install-action&package-manager=github_actions&previous-version=31&new-version=32)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>


___

### **PR Type**
enhancement, dependencies


___

### **Description**
- Upgraded `nixbuild/nix-quick-install-action` from v31 to v32 in CI
workflow

- Ensures use of latest Nix installer with security updates

- No other workflow or code changes included


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>

<summary><strong>gen_schedule_update_deps.yaml</strong><dd><code>Upgrade
nix-quick-install-action to v32 in workflow</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/gen_schedule_update_deps.yaml

<li>Updated the GitHub Actions step to use
<br><code>nixbuild/nix-quick-install-action@v32</code> instead of
v31<br> <li> Keeps CI environment up-to-date with latest Nix installer
and security <br>fixes


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/656/files#diff-ae003e22c1e5cbf186e1749d77dec35965e521d2583ba8cf45fcb1c8f300e177">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-26 10:32:48 +02:00
David Barroso
c7e577b513 feat: migrate last few endpoints to golang (#653)
### **User description**
🎉🎉🎉🎉🎉🎉🎉

Node.js is no more from the service. Tests have also been migrated to
bun as it was a drop-in replacement and speed things up.

___

### **PR Type**
Enhancement


___

### **Description**
- Add three new authentication endpoints to Go API

- Implement user signout with single/all session options

- Add JWT token verification endpoint functionality

- Include user information retrieval endpoint


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>11
files</summary><table>
<tr>
<td><strong>server.gen.go</strong><dd><code>Add generated server code
for new endpoints</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+307/-94</a></td>

</tr>

<tr>
<td><strong>types.gen.go</strong><dd><code>Add request/response types
for new endpoints</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+27/-4</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>controller.go</strong><dd><code>Add DeleteRefreshToken
method to DBClient interface</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-68eba6c5b3be94c2016a5c821351ad07c60e395226594ff744901f759e22af15">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>errors.go</strong><dd><code>Add error handling for new
endpoints</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-d2ebd3582b320c6db8161b6f3f90931cee507a68d9667ca1f6c88e8108ede569">+13/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>get_user.go</strong><dd><code>Implement GET /user endpoint
handler</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-ff88db799ee5509cf87961dfbe457becac8368c0219dc3048a7962113b5a23e2">+78/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>post_signout.go</strong><dd><code>Implement POST /signout
endpoint handler</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-682119325058fb9866c24830d910fc19e734c1f3bde7d61a4f671cc17b93ff96">+38/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>post_token_verify.go</strong><dd><code>Implement POST
/token/verify endpoint handler</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-fc96c64f7ae67cf4ad34de7e9bc5cb19129e71dd6274c58e5749750df620e0e8">+27/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>workflows.go</strong><dd><code>Add JWT verification and
token deletion workflows</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-6aaacc47584f1edde5a01051611a7baffc583fc32b48df6d7fee39afa16a65cb">+71/-5</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>query.sql.go</strong><dd><code>Add generated
DeleteRefreshToken database method</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-442fde6e20ac506fb6bc13c00a7374ee9c33b183ffda72db4e49e1b013cd4cde">+10/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>openapi.yaml</strong><dd><code>Add OpenAPI specs for new
endpoints</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-9fe8f7da727ff26c02939aa060e0348d870e6dd95ba433f9f4d53a9a6967aca0">+87/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>query.sql</strong><dd><code>Add DeleteRefreshToken SQL
query</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-c19dd96472c44a7389d4d1f72e0a1879df1e06e8e4d333ca3cb6b6dfbe3083ef">+4/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>17
files</summary><table>
<tr>
<td><strong>get_user_test.go</strong><dd><code>Add comprehensive tests
for user endpoint</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-a384a0b80b29014dd574d56c5e5eda6f41470acdfbe8dabbe3af3b9159e0e735">+154/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>controller.go</strong><dd><code>Add mock for
DeleteRefreshToken method</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-f1b1f168b0924b023c571d6274d53defef472a872f5fee4de1c4ae78959cc327">+14/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>

<td><strong>post_elevate_webauthn_verify_test.go</strong><dd><code>Update
test response with ActiveMfaType field</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-07856a39c8a5430d741bcf08861eb85bdd09b2785ce4296eaf3d2697bbc53855">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_anonymous_test.go</strong><dd><code>Update test
responses with ActiveMfaType field</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-c25dbd9375a284855b2297546ad1f6e2550bfaa189af9aea805d8a20c21fddea">+3/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_email_password_test.go</strong><dd><code>Update
test responses with ActiveMfaType field</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-20169cf1b0f6c102c29b882d28234333096dd5fc226ad1a92119e00206e4c26e">+3/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_idtoken_test.go</strong><dd><code>Update test
responses with ActiveMfaType field</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-d849cc9b72340eb39d633b2446f3223cb202e09cabdef07b5ce512f15fc129f2">+4/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_mfa_totp_test.go</strong><dd><code>Update test
response with ActiveMfaType field</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-2f07c5c0613472bcfad7967a8116602ffa8f33856de94380d50ccdbd95bec206">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>

<td><strong>post_signin_otp_email_verify_test.go</strong><dd><code>Update
test response with ActiveMfaType field</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-df88ef70165a67033c322cc91cd5d0c28d7459f69c709ac9074fb8222e518a7f">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>

<td><strong>post_signin_passwordless_sms_otp_test.go</strong><dd><code>Update
test responses with ActiveMfaType field</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-852ae47a5ab7ad9241dc132565e8935025c90bf54f776eefd92a35462d1ad94f">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_pat_test.go</strong><dd><code>Update test
responses with ActiveMfaType field</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-020127c3b0d584aa14d94f93ce33be359ce58e7fb9b893211d4edaaceedac9e9">+3/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>

<td><strong>post_signin_webauthn_verify_test.go</strong><dd><code>Update
test responses with ActiveMfaType field</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-1c449231790f6e56e26d47fecb200b1f2b3585ea9f80ad19ab8f905b01094a46">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signout_test.go</strong><dd><code>Add comprehensive
tests for signout endpoint</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-d00ef8fa496c728003f75a5ea96da5ee58427883d433b923cc8550ad83788852">+240/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>post_signup_email_password_test.go</strong><dd><code>Update
test responses with ActiveMfaType field</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-c7050138b811ec2f854c0dfa34ac1eb9f03831c1f682e6a677dfe16943cb5f84">+5/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>

<td><strong>post_signup_webauthn_verify_test.go</strong><dd><code>Update
test responses with ActiveMfaType field</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-c93cb267e3fcbec34fe2f8c5dbc204bb6d2cbc9fff58597ad761da5a8e661c3c">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_token_test.go</strong><dd><code>Update test responses
with ActiveMfaType field</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-dfb4a72aeccf26b3cfb4f1a91a0d2807896febd4b602cfca4b751636befde18a">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_token_verify_test.go</strong><dd><code>Add tests for
token verification endpoint</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-62e46f99186e19026de69c5fc76018a1da786d42ec53789c62fb6f322b6efe30">+76/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>user.test.ts</strong><dd><code>Update test expectation for
unauthenticated user</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-81735490d16bd713d0cb1e56f6142829870fbc951a8fa53e70304f2dd6ad8567">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>CLAUDE.md</strong><dd><code>Add comprehensive Go migration
documentation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/653/files#diff-6ebdb617a8104a7756d0cf36578ab01103dc9f07e4dc6feb751296b9c402faf7">+415/-0</a>&nbsp;
</td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-06-25 14:32:18 +02:00
David Barroso
92b594c523 fix: simplify email extraction to just look for < > (#655)
### **PR Type**
Bug fix


___

### **Description**
- Simplify email extraction logic from regex to string operations

- Remove regex dependency for better performance

- Update test expectations for malformed email handling

- Add new test cases for hyphenated domains and names


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>email.go</strong><dd><code>Replace regex with string
operations for email extraction</code></dd></summary>
<hr>

go/notifications/email.go

<li>Replace regex-based email extraction with simple string operations
<br>using <code>strings.Index</code><br> <li> Remove <code>regexp</code>
import dependency<br> <li> Simplify logic to only extract emails
enclosed in angle brackets


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/655/files#diff-23fa6c5970f0d27bd2b007e64626e30c82dd1f5c19391dcbfe544e26f393ea86">+4/-5</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>email_test.go</strong><dd><code>Update tests for
simplified email extraction logic</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/notifications/email_test.go

<li>Update expected results for malformed email test cases<br> <li>
Change behavior for strings without angle brackets to return original
<br>input<br> <li> Add two new test cases for hyphenated domains and
display names


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/655/files#diff-15b6541fe822c5bba389b86f6988a6ef20b0b694703889f84acf4d5013df7c18">+12/-2</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-06-25 14:12:53 +02:00
dependabot[bot]
0b316c95bc chore: bump nixbuild/nix-quick-install-action from 30 to 31 (#652)
### **User description**
Bumps
[nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action)
from 30 to 31.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/releases">nixbuild/nix-quick-install-action's
releases</a>.</em></p>
<blockquote>
<h2>nixbuild/nix-quick-install-action@v31</h2>
<h2>Changes</h2>
<ul>
<li>
<p>Remove Nix versions: 2.25.5</p>
</li>
<li>
<p>Bump minor Nix versions: 2.24.12 -&gt; 2.24.14, 2.26.1 -&gt; 2.26.3
2.21.0 -&gt; 2.21.4.</p>
</li>
<li>
<p>Add Nix versions: 2.28.3, 2.29.0</p>
</li>
<li>
<p>Bump default Nix version: 2.24.12 -&gt; 2.29.0</p>
</li>
<li>
<p>Fix issue with 'experimental-features' setting getting overwritten
(<a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/66">#66</a>).</p>
</li>
</ul>
<h2>Supported Nix Versions on x86_64-linux runners</h2>
<ul>
<li>2.29.0</li>
<li>2.28.3</li>
<li>2.26.3</li>
<li>2.24.14</li>
<li>2.3.18</li>
</ul>
<h2>Supported Nix Versions on aarch64-linux runners</h2>
<ul>
<li>2.29.0</li>
<li>2.28.3</li>
<li>2.26.3</li>
<li>2.24.14</li>
</ul>
<h2>Supported Nix Versions on x86_64-darwin runners</h2>
<ul>
<li>2.29.0</li>
<li>2.28.3</li>
<li>2.26.3</li>
<li>2.24.14</li>
<li>2.3.18</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE">nixbuild/nix-quick-install-action's
changelog</a>.</em></p>
<blockquote>
<p>v31</p>
<h2>Changes</h2>
<ul>
<li>
<p>Remove Nix versions: 2.25.5</p>
</li>
<li>
<p>Bump minor Nix versions: 2.24.12 -&gt; 2.24.14, 2.26.1 -&gt; 2.26.3
2.21.0 -&gt; 2.21.4.</p>
</li>
<li>
<p>Add Nix versions: 2.28.3, 2.29.0</p>
</li>
<li>
<p>Bump default Nix version: 2.24.12 -&gt; 2.29.0</p>
</li>
<li>
<p>Fix issue with 'experimental-features' setting getting overwritten
(<a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/66">#66</a>).</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="889f3180bb"><code>889f318</code></a>
Release v31</li>
<li><a
href="09d596a493"><code>09d596a</code></a>
Fix workflow</li>
<li><a
href="ce8e5b9320"><code>ce8e5b9</code></a>
Document <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/45">#45</a></li>
<li><a
href="d9bcabc69f"><code>d9bcabc</code></a>
Avoid overwriting user-supplied experimental-feature setting. Fixes <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/66">#66</a>.</li>
<li><a
href="9eb57d6652"><code>9eb57d6</code></a>
Remove unused file</li>
<li><a
href="b6ab472bc4"><code>b6ab472</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/67">#67</a>
from nixbuild/nix_2_29</li>
<li><a
href="255feab0a1"><code>255feab</code></a>
Add Nix 2.29. Remove deprecated version 2.25.</li>
<li><a
href="8505cd40ae"><code>8505cd4</code></a>
Update README and workflows for v30</li>
<li>See full diff in <a
href="https://github.com/nixbuild/nix-quick-install-action/compare/v30...v31">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nixbuild/nix-quick-install-action&package-manager=github_actions&previous-version=30&new-version=31)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>


___

### **PR Type**
Other


___

### **Description**
- Bump nixbuild/nix-quick-install-action from v30 to v31

- Update GitHub Actions dependency version

- Includes Nix version updates and bug fixes


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>gen_schedule_update_deps.yaml</strong><dd><code>Update
Nix installation action version</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/gen_schedule_update_deps.yaml

- Update nixbuild/nix-quick-install-action from v30 to v31


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/652/files#diff-ae003e22c1e5cbf186e1749d77dec35965e521d2583ba8cf45fcb1c8f300e177">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-23 08:57:37 +02:00
dependabot[bot]
6f3778f18f chore: bump Codium-ai/pr-agent from 0.29 to 0.30 (#654)
### **User description**
Bumps [Codium-ai/pr-agent](https://github.com/codium-ai/pr-agent) from
0.29 to 0.30.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codium-ai/pr-agent/releases">Codium-ai/pr-agent's
releases</a>.</em></p>
<blockquote>
<h2>v0.30</h2>
<p>codiumai/pr-agent:0.30
codiumai/pr-agent:0.30-github_app
codiumai/pr-agent:0.30-bitbucket-app
codiumai/pr-agent:0.30-gitlab_webhook
codiumai/pr-agent:0.30-github_action
codiumai/pr-agent:0.30-azure_devops_webhook
codiumai/pr-agent:0.30-gitea-app</p>
<h2>What's Changed</h2>
<ul>
<li>Adding num_max_findings configuration parameter by <a
href="https://github.com/GuBee33"><code>@​GuBee33</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1797">qodo-ai/pr-agent#1797</a></li>
<li>docs: document how to auto-trigger /add_docs via pr_commands by <a
href="https://github.com/jmsb02"><code>@​jmsb02</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1795">qodo-ai/pr-agent#1795</a></li>
<li>Revise the review effort label text in the review document by <a
href="https://github.com/seohyun-lee"><code>@​seohyun-lee</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1799">qodo-ai/pr-agent#1799</a></li>
<li>Add incremental update to documentation by <a
href="https://github.com/sharoneyal"><code>@​sharoneyal</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1796">qodo-ai/pr-agent#1796</a></li>
<li><a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1657">#1657</a>
add gitea/forgejo support by <a
href="https://github.com/nicholasgribanov"><code>@​nicholasgribanov</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1787">qodo-ai/pr-agent#1787</a></li>
<li>Correct typos in documentation and log messages by <a
href="https://github.com/seohyun-lee"><code>@​seohyun-lee</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1798">qodo-ai/pr-agent#1798</a></li>
<li>fix: reorder exception handling in
<code>LiteLLMAIHandler.chat_completion()</code> by <a
href="https://github.com/KangmoonSeo"><code>@​KangmoonSeo</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1803">qodo-ai/pr-agent#1803</a></li>
<li>Update LICENSE by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1809">qodo-ai/pr-agent#1809</a></li>
<li>docs: include [aws] in .secrets.template by <a
href="https://github.com/darkdread"><code>@​darkdread</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1801">qodo-ai/pr-agent#1801</a></li>
<li>fix: exclude RateLimitError from <code>@retry</code> in
<code>AIHandler.chat_completion()</code> by <a
href="https://github.com/KangmoonSeo"><code>@​KangmoonSeo</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1808">qodo-ai/pr-agent#1808</a></li>
<li>Add unit tests for try_fix_yaml function by <a
href="https://github.com/jwsong98"><code>@​jwsong98</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1812">qodo-ai/pr-agent#1812</a></li>
<li>feat: add support for Claude 4 family by <a
href="https://github.com/hirobf10"><code>@​hirobf10</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1814">qodo-ai/pr-agent#1814</a></li>
<li>Add Grok-3 non-beta model IDs by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1817">qodo-ai/pr-agent#1817</a></li>
<li>Add Unit Tests and Improve Documentation for utils.py clip_tokens
Function by <a
href="https://github.com/TaskerJang"><code>@​TaskerJang</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1816">qodo-ai/pr-agent#1816</a></li>
<li>Refactor count_tokens method structure in token_handler.py for
better extensibility by <a
href="https://github.com/Kkan9ma"><code>@​Kkan9ma</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1805">qodo-ai/pr-agent#1805</a></li>
<li>Improve/describe tool documentation and make add_diagram feature
opt-in by default by <a
href="https://github.com/ssunbear"><code>@​ssunbear</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1824">qodo-ai/pr-agent#1824</a></li>
<li>fix: ensure proper formatting of changes_diagram in PR description
ou… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1827">qodo-ai/pr-agent#1827</a></li>
<li>fix(test_language_handler): Add edge case for files with unknown
extensions by <a
href="https://github.com/wonggamggik"><code>@​wonggamggik</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1818">qodo-ai/pr-agent#1818</a></li>
<li>Feature/test get max tokens by <a
href="https://github.com/wonggamggik"><code>@​wonggamggik</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1819">qodo-ai/pr-agent#1819</a></li>
<li>Complete Gemini 2.5 Flash model info by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1822">qodo-ai/pr-agent#1822</a></li>
<li>Add unit tests for fix_json_escape_char function by <a
href="https://github.com/idealHyun"><code>@​idealHyun</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1825">qodo-ai/pr-agent#1825</a></li>
<li>test: add tests for converting to markdown by <a
href="https://github.com/dst03106"><code>@​dst03106</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1829">qodo-ai/pr-agent#1829</a></li>
<li>docs: correct parameter name typo and update description by <a
href="https://github.com/isExample"><code>@​isExample</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1831">qodo-ai/pr-agent#1831</a></li>
<li>Refactor: Enhance AI Handler Robustness, Interface Compliance, and
Asynchronous Operations (Resolves <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1784">#1784</a>)
by <a href="https://github.com/Akileox"><code>@​Akileox</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1828">qodo-ai/pr-agent#1828</a></li>
<li>[Feature] - Gitea implement by <a
href="https://github.com/pinyoothotaboot"><code>@​pinyoothotaboot</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1811">qodo-ai/pr-agent#1811</a></li>
<li>docs: add dedicated &quot;Chat on code suggestions&quot; core
ability by <a
href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1835">qodo-ai/pr-agent#1835</a></li>
<li>docs: enhance review.md with ticket compliance labels and merge
block… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1837">qodo-ai/pr-agent#1837</a></li>
<li>docs: add Linear integration to ticket context fetching
documentation by <a
href="https://github.com/hussam789"><code>@​hussam789</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1838">qodo-ai/pr-agent#1838</a></li>
<li>Reorganize and Enhance Tools Documentation with Improved Navigation
and Consistency
by <a href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1840">qodo-ai/pr-agent#1840</a></li>
<li>feat: add AWS Secrets Manager Integration for Lambda deployments by
<a href="https://github.com/yamoyamoto"><code>@​yamoyamoto</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1839">qodo-ai/pr-agent#1839</a></li>
<li>docs: update trial usage information to reflect new quota-based
model by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1832">qodo-ai/pr-agent#1832</a></li>
<li>docs: add global hierarchical best practices system by <a
href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1844">qodo-ai/pr-agent#1844</a></li>
<li>Hl/multi jira server docs by <a
href="https://github.com/hussam789"><code>@​hussam789</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1845">qodo-ai/pr-agent#1845</a></li>
<li>Update atlassian-connect.json by <a
href="https://github.com/hussam789"><code>@​hussam789</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1850">qodo-ai/pr-agent#1850</a></li>
<li>Add Google Gemini 2.5 Pro Preview 06-05 by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1853">qodo-ai/pr-agent#1853</a></li>
<li>Fix gitea get file content error by <a
href="https://github.com/SCREEN88"><code>@​SCREEN88</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1852">qodo-ai/pr-agent#1852</a></li>
<li>chore: add APAC region endpoints for Bedrock Anthropic Claude models
by <a href="https://github.com/kebhr"><code>@​kebhr</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1851">qodo-ai/pr-agent#1851</a></li>
<li>docs: update PR benchmark to ranking-based methodology with expanded
… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1866">qodo-ai/pr-agent#1866</a></li>
<li>Add GitLab support for CHANGELOG.md by <a
href="https://github.com/cesdperez"><code>@​cesdperez</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1856">qodo-ai/pr-agent#1856</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="eb4cdbb115"><code>eb4cdbb</code></a>
fix: remove branch parameter from get_content_of_file call in bitbucket
serve...</li>
<li><a
href="7f54b14b4d"><code>7f54b14</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1874">#1874</a>
from yoohya/feat/support-gitlab-lambda-webhooks</li>
<li><a
href="938ab9a139"><code>938ab9a</code></a>
fix: remove redundant word 'possible' from security concerns field
description</li>
<li><a
href="75bde39b03"><code>75bde39</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1888">#1888</a>
from qodo-ai/tr/simplify_toDo</li>
<li><a
href="ee36c0208c"><code>ee36c02</code></a>
Update pr_agent/settings/pr_reviewer_prompts.toml</li>
<li><a
href="7c02678ba5"><code>7c02678</code></a>
refactor: extract TODO formatting functions and simplify data
structure</li>
<li><a
href="235df737d0"><code>235df73</code></a>
docs: update Docker image tags</li>
<li><a
href="37ef4bad8f"><code>37ef4ba</code></a>
docs: add bullet point formatting instruction to PR description
prompts</li>
<li><a
href="ab7e0d9141"><code>ab7e0d9</code></a>
refactor: split serverless handlers into dedicated GitHub and GitLab
Lambda e...</li>
<li><a
href="7db4d97fc2"><code>7db4d97</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1880">#1880</a>
from alessio-locatelli/fix_yes_no</li>
<li>Additional commits viewable in <a
href="https://github.com/codium-ai/pr-agent/compare/v0.29...v0.30">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Codium-ai/pr-agent&package-manager=github_actions&previous-version=0.29&new-version=0.30)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>


___

### **PR Type**
Other


___

### **Description**
- Bump Codium-ai/pr-agent GitHub Action from v0.29 to v0.30

- Update dependency version in workflow configuration


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>gen_ai_review.yaml</strong><dd><code>Update pr-agent
action version</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

.github/workflows/gen_ai_review.yaml

- Updated Codium-ai/pr-agent action version from v0.29 to v0.30


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/654/files#diff-d1e4c772e0acb5ce4891df2dd94ba58ffaf6393e8f75493ec7e10cbce1c4992c">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-06-23 08:38:41 +02:00
David Barroso
d34d23aa69 feat: custom-claims: allow filtered jsonpath (#651)
### **User description**
for instance, something like:

```toml
[[auth.session.accessToken.customClaims]]
key = 'department-manager'
value = 'departments[?(@.role == "manager")].id'

[[auth.session.accessToken.customClaims]]
key = 'department-member'
value = 'departments[?(@.role == "member")].id'
```


___

### **PR Type**
Enhancement


___

### **Description**
• Add support for JSONPath filter expressions in custom claims
• Implement smart path splitting to handle bracket notation
• Extract filter fields for proper GraphQL query generation
• Refactor map operations using Go's built-in maps package


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>custom_claims.go</strong><dd><code>Implement JSONPath
filter expression support</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/custom_claims.go

• Add <code>smartSplit</code> function to handle JSONPath expressions
with brackets<br> <br>• Implement <code>extractFilterFields</code> to
parse filter expressions like <br><code>[?(@.field ==
'value')]</code><br> • Update <code>IsArrary</code> method to detect
filter <br>expressions<br> • Refactor map copying using
<code>maps.Copy</code> instead of manual <br>iteration


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/651/files#diff-c548bbd2d2f0049972a2e9f4109812ad085354f2ad80f33d5faffb7fbbbcf71a">+112/-7</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>custom_claims_test.go</strong><dd><code>Add tests for
JSONPath filter functionality</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/custom_claims_test.go

• Add test data with filterable array structure<br> • Include test case
<br>for filtered JSONPath expression <code>m.d[?(@.v ==
'a')].id</code><br> • Update <br>expected GraphQL query to include
filter field dependencies<br> • Add <br>expected filtered results
validation


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/651/files#diff-fe8259aacd678b29540bb6ae15315e7465f5f12299e27b68bdfb0cc6206f7bd1">+20/-1</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-06-17 19:28:53 +02:00
David Barroso
3f8cafe6d6 feat: migrate passwordless sms endpoints to go (#650) 2025-06-17 13:47:57 +02:00
David Barroso
35fb1197d0 feat: migrate remaining webauthn endpoints to go (#647) 2025-06-13 12:35:53 +02:00
David Barroso
3643bec04f feat: migrate social providers to go (#625) 2025-06-11 13:21:02 +02:00
David Barroso
4d56ac937b fix: more fixes to webauthn schema that were causing problems (#641)
### **PR Type**
Bug fix


___

### **Description**
• Fix WebAuthn schema structure for signup verification
• Move nickname field to top level in request
• Update OpenAPI specification for proper schema
• Correct test cases with new field structure


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>server.gen.go</strong><dd><code>Regenerate server code
with fixed schema</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/api/server.gen.go

• Update generated server code with new WebAuthn schema<br> • Regenerate
<br>swagger specification with corrected structure


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/641/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+73/-73</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>types.gen.go</strong><dd><code>Restructure WebAuthn
signup verification request types</code>&nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/api/types.gen.go

• Move <code>nickname</code> field to top level in
<code>SignUpWebauthnVerifyRequest</code><br> • <br>Replace nested
options structure with reference to <code>SignUpOptions</code><br> •
<br>Simplify request structure by removing duplicate fields


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/641/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+4/-13</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>post_signup_webauthn_verify.go</strong><dd><code>Update
nickname handling in WebAuthn verification</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/post_signup_webauthn_verify.go

• Update nickname extraction to use top-level field<br> • Remove nested
<br>options nickname handling<br> • Use <code>deptr</code> helper for
nickname value <br>extraction


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/641/files#diff-fbe1db0985461306762b3b57a637ac6e5040ae1a2ae09cda59ec38b37d05ec98">+2/-7</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>openapi.yaml</strong><dd><code>Fix OpenAPI schema for
WebAuthn signup verification</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

go/api/openapi.yaml

• Move <code>nickname</code> field to top level in
<code>SignUpWebauthnVerifyRequest</code><br> • <br>Replace inline
options with reference to <code>SignUpOptions</code> schema<br> • Remove
<br>YAML anchor reference for cleaner structure


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/641/files#diff-9fe8f7da727ff26c02939aa060e0348d870e6dd95ba433f9f4d53a9a6967aca0">+5/-8</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>

<summary><strong>post_signup_webauthn_verify_test.go</strong><dd><code>Update
WebAuthn verification tests for new schema</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/post_signup_webauthn_verify_test.go

• Add <code>Nickname</code> field to test request objects<br> • Update
expected <br>database values for nickname field<br> • Ensure all test
cases include <br>nickname parameter


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/641/files#diff-c93cb267e3fcbec34fe2f8c5dbc204bb6d2cbc9fff58597ad761da5a8e661c3c">+8/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-05-30 10:16:12 +02:00
David Barroso
f300de5cc4 fix: minor fixes to webauthn schema that were causing problems (#640)
### **PR Type**
Enhancement, Bug fix


___

### **Description**
- Improved error handling in PostSigninWebauthn

- Fixed SignInWebauthnVerifyRequest and SignUpWebauthnVerifyRequest
schemas

- Updated SignUpWebauthnVerifyRequest credential field

- Removed additional properties from request objects


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Error
handling</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>server.gen.go</strong><dd><code>Enhance error handling
in PostSigninWebauthn</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/server.gen.go

<li>Added error check for io.EOF in PostSigninWebauthn<br> <li> Improved
error handling for JSON binding


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/640/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+78/-76</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>types.gen.go</strong><dd><code>Update WebAuthn request
structs and remove custom JSON handling</code></dd></summary>
<hr>

go/api/types.gen.go

<li>Removed AdditionalProperties from SignInWebauthnVerifyRequest<br>
<li> Updated SignUpWebauthnVerifyRequest Credential field to
non-pointer<br> <li> Removed custom JSON marshaling/unmarshaling methods


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/640/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+8/-174</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>

<summary><strong>post_signup_webauthn_verify_test.go</strong><dd><code>Update
WebAuthn request structs in test cases</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/post_signup_webauthn_verify_test.go

<li>Updated WebAuthn request structs in test functions<br> <li> Removed
AdditionalProperties from test request objects


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/640/files#diff-c93cb267e3fcbec34fe2f8c5dbc204bb6d2cbc9fff58597ad761da5a8e661c3c">+18/-25</a>&nbsp;
</td>

</tr>
</table></td></tr><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>openapi.yaml</strong><dd><code>Update OpenAPI schema
for WebAuthn requests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/openapi.yaml

<li>Made signin/webauthn requestBody optional<br> <li> Removed
additionalProperties from WebAuthn verify requests<br> <li> Updated
SignUpWebauthnVerifyRequest schema


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/640/files#diff-9fe8f7da727ff26c02939aa060e0348d870e6dd95ba433f9f4d53a9a6967aca0">+11/-11</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-05-28 19:31:59 +02:00
David Barroso
48269c3d2e fix: extract email and set MAIL FROM and RCPT TO header correctly (#639)
### **User description**
This should fix an issue when using in the from `My Name <asd@asd.com>`
with stricter servers like Gmail.


___

### **PR Type**
Bug fix, Enhancement


___

### **Description**
- Extract email addresses from formatted strings

- Use extracted emails for SMTP envelope

- Add ExtractEmail function and unit tests

- Update email sending test cases


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>email.go</strong><dd><code>Enhance email extraction and
SMTP envelope handling</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/notifications/email.go

<li>Add ExtractEmail function to parse email addresses<br> <li> Modify
Send function to use extracted email addresses<br> <li> Update SMTP
envelope with plain email addresses


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/639/files#diff-23fa6c5970f0d27bd2b007e64626e30c82dd1f5c19391dcbfe544e26f393ea86">+17/-2</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>email_test.go</strong><dd><code>Add tests for email
extraction and sending</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/notifications/email_test.go

<li>Add unit tests for ExtractEmail function<br> <li> Expand
TestEmailSend with new test cases<br> <li> Test both plain and formatted
email addresses


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/639/files#diff-15b6541fe822c5bba389b86f6988a6ef20b0b694703889f84acf4d5013df7c18">+65/-6</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-05-26 19:55:38 +02:00
dependabot[bot]
984c2733a0 chore: bump Codium-ai/pr-agent from 0.28 to 0.29 (#633)
### **User description**
Bumps [Codium-ai/pr-agent](https://github.com/codium-ai/pr-agent) from
0.28 to 0.29.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codium-ai/pr-agent/releases">Codium-ai/pr-agent's
releases</a>.</em></p>
<blockquote>
<h2>v0.29</h2>
<p>codiumai/pr-agent:0.29
codiumai/pr-agent:0.29-github_app
codiumai/pr-agent:0.29-bitbucket-app
codiumai/pr-agent:0.29-gitlab_webhook
codiumai/pr-agent:0.29-github_action
codiumai/pr-agent:0.29-azure_devops_webhook</p>
<h2>What's Changed</h2>
<ul>
<li>Update logging configuration to use dynamic log level from settings
by <a href="https://github.com/jmrtnz94"><code>@​jmrtnz94</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1667">qodo-ai/pr-agent#1667</a></li>
<li>Docs: Add Core Abilities / Interactivity by <a
href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1674">qodo-ai/pr-agent#1674</a></li>
<li>Updated Dockerfile.lambda for python version 3.12 by <a
href="https://github.com/saumil-kapadia-stellantispublic"><code>@​saumil-kapadia-stellantispublic</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1677">qodo-ai/pr-agent#1677</a></li>
<li>Add support of OpenAI GPT-4.5 Preview model by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1679">qodo-ai/pr-agent#1679</a></li>
<li>Add support of Meta's Llama 4 Scout and Maverick 17b from Groq Cloud
by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1680">qodo-ai/pr-agent#1680</a></li>
<li>Add support of xAI and their Grok-2 &amp; Grok-3 model by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1684">qodo-ai/pr-agent#1684</a></li>
<li>Add support of Gemini 2.5 Pro preview model by <a
href="https://github.com/imperorrp"><code>@​imperorrp</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1685">qodo-ai/pr-agent#1685</a></li>
<li>Support Bitbucket Basic Auth by <a
href="https://github.com/wirelessr"><code>@​wirelessr</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1683">qodo-ai/pr-agent#1683</a></li>
<li>Add support of OpenAI GPT-4.1 model family by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1694">qodo-ai/pr-agent#1694</a></li>
<li>Fix Discord link in README by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1691">qodo-ai/pr-agent#1691</a></li>
<li>Correct the tools guide link in the locally installation doc by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1692">qodo-ai/pr-agent#1692</a></li>
<li>Improve Markdown format in model configuration guide by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1693">qodo-ai/pr-agent#1693</a></li>
<li>Azure AD authentication for OpenAI services by <a
href="https://github.com/arpit-at"><code>@​arpit-at</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1698">qodo-ai/pr-agent#1698</a></li>
<li>Add new tool for scanning repository discussions and generating best
… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1701">qodo-ai/pr-agent#1701</a></li>
<li>Add OpenAI o3 &amp; o4-mini reasoning models by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1702">qodo-ai/pr-agent#1702</a></li>
<li>Add Basic Authentication method for Jira Data Center/Server and
valid… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1705">qodo-ai/pr-agent#1705</a></li>
<li>Improve markdown docs formatting for consistency and readability by
<a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1706">qodo-ai/pr-agent#1706</a></li>
<li>Update GitHub actions version by <a
href="https://github.com/DongjaJ"><code>@​DongjaJ</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1704">qodo-ai/pr-agent#1704</a></li>
<li>Add support for Mistral and Codestral models by <a
href="https://github.com/dst03106"><code>@​dst03106</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1707">qodo-ai/pr-agent#1707</a></li>
<li>Add .venv/ to .dockerignore and .gitignore for virtual env
compatibility by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1709">qodo-ai/pr-agent#1709</a></li>
<li>docs: updated bitbucket pipeline docs by <a
href="https://github.com/nicohein"><code>@​nicohein</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1703">qodo-ai/pr-agent#1703</a></li>
<li>Feature/simplified bitbucket pipeline by <a
href="https://github.com/nicohein"><code>@​nicohein</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1711">qodo-ai/pr-agent#1711</a></li>
<li>Replace default o3-mini with o4-mini by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1710">qodo-ai/pr-agent#1710</a></li>
<li>Improvement: Enhance ask_line tool by adding PR review comment
threads as context by <a
href="https://github.com/benedict-lee"><code>@​benedict-lee</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1687">qodo-ai/pr-agent#1687</a></li>
<li>Add documentation for chat functionality in code suggestions by <a
href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1719">qodo-ai/pr-agent#1719</a></li>
<li>Tr/multi model prompt by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1726">qodo-ai/pr-agent#1726</a></li>
<li>Docs: fix typo in response_language setting inside .pr-agent.toml
configuration guide by <a
href="https://github.com/bananana0118"><code>@​bananana0118</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1721">qodo-ai/pr-agent#1721</a></li>
<li>Update .gitignore and fix license format in pyproject.toml by <a
href="https://github.com/barnett-yuxiang"><code>@​barnett-yuxiang</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1718">qodo-ai/pr-agent#1718</a></li>
<li>Fix type hint for get_pr_description method and clean up whitespace
by <a
href="https://github.com/barnett-yuxiang"><code>@​barnett-yuxiang</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1728">qodo-ai/pr-agent#1728</a></li>
<li>docs: update Gemini model path from google_ai_studio to gemini in
con… by <a
href="https://github.com/Yash-1511"><code>@​Yash-1511</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1731">qodo-ai/pr-agent#1731</a></li>
<li>Use slim Docker image and install git and curl dependencies by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1738">qodo-ai/pr-agent#1738</a></li>
<li>doc: title refinement by <a
href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1737">qodo-ai/pr-agent#1737</a></li>
<li>Azure devops: parse PR url starting from the end by <a
href="https://github.com/twdkeule"><code>@​twdkeule</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1742">qodo-ai/pr-agent#1742</a></li>
<li>Openrouter support by <a
href="https://github.com/irfansofyana"><code>@​irfansofyana</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1744">qodo-ai/pr-agent#1744</a></li>
<li>fix: Prevent duplicate language instructions in extra_instructions
by <a href="https://github.com/MaxnSter"><code>@​MaxnSter</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1745">qodo-ai/pr-agent#1745</a></li>
<li>fix(gitlab): trigger when MR changes from draft to ready by <a
href="https://github.com/simonstamm"><code>@​simonstamm</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1749">qodo-ai/pr-agent#1749</a></li>
<li>fix:correct typo in logger parameter from 'artifacts' to 'artifact'
by <a
href="https://github.com/jihan-chillin"><code>@​jihan-chillin</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1753">qodo-ai/pr-agent#1753</a></li>
<li>docs: clarify that .pr_agent.toml can be updated post PR creation by
<a href="https://github.com/isExample"><code>@​isExample</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1760">qodo-ai/pr-agent#1760</a></li>
<li>fix: avoid duplicate header for list types to prevent markdown break
by <a href="https://github.com/joosomi"><code>@​joosomi</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1758">qodo-ai/pr-agent#1758</a></li>
<li>fix: update Docker base image to slim version and install required
de… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1762">qodo-ai/pr-agent#1762</a></li>
<li>Implement Azure Devops persistent comment by <a
href="https://github.com/twdkeule"><code>@​twdkeule</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1746">qodo-ai/pr-agent#1746</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="db5138dc42"><code>db5138d</code></a>
Improve YAML parsing with additional fallback strategies for AI
predictions</li>
<li><a
href="9a9feb47a6"><code>9a9feb4</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1786">#1786</a>
from qodo-ai/pr-1736</li>
<li><a
href="52ce74a31a"><code>52ce74a</code></a>
Remove debug print statements from repository filtering tests</li>
<li><a
href="f47da75e6f"><code>f47da75</code></a>
Remove debug print statement from should_process_pr_logic function</li>
<li><a
href="42557feb97"><code>42557fe</code></a>
Enhance repository filtering with regex pattern matching for
ignore_repositories</li>
<li><a
href="c15fb16528"><code>c15fb16</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1779">#1779</a>
from dnnspaul/main</li>
<li><a
href="d268db5f0d"><code>d268db5</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1778">#1778</a>
from smartandhandsome/main</li>
<li><a
href="ec626f0193"><code>ec626f0</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1785">#1785</a>
from qodo-ai/tr/gemini-2.5-pro-preview-05-06</li>
<li><a
href="9974015682"><code>9974015</code></a>
Add Gemini-2.5-pro-preview-05-06 model and update litellm
dependency</li>
<li><a
href="250870a3da"><code>250870a</code></a>
enable usage of openai like apis</li>
<li>Additional commits viewable in <a
href="https://github.com/codium-ai/pr-agent/compare/v0.28...v0.29">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Codium-ai/pr-agent&package-manager=github_actions&previous-version=0.28&new-version=0.29)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>


___

### **PR Type**
Enhancement


___

### **Description**
- Update PR Agent action to version 0.29


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>gen_ai_review.yaml</strong><dd><code>Bump PR Agent
action version</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/gen_ai_review.yaml

- Updated Codium-ai/pr-agent action from v0.28 to v0.29


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/633/files#diff-d1e4c772e0acb5ce4891df2dd94ba58ffaf6393e8f75493ec7e10cbce1c4992c">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-19 10:16:31 +02:00
David Barroso
c9b0829936 chore: update dependencies (#627)
### **PR Type**
Enhancement, Tests


___

### **Description**
- Update Go version and dependencies

- Replace context.Background() with t.Context() in tests

- Remove deprecated linter and update config

- Minor code improvements and refactoring


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>controller.go</strong><dd><code>Remove linter directive for
In5Minutes constant</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-68eba6c5b3be94c2016a5c821351ad07c60e395226594ff744901f759e22af15">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>20
files</summary><table>
<tr>
<td><strong>get_mfa_totp_generate_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-f3713ebc3b23b6469bb6dc61b17c2511b8ba2c99dde26c5a71aabb0a5ae43383">+2/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>get_verify_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-39be138c7af04b1b5589a328930150326200286aecd694c8ca46d72d455e1b78">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>jwt_test.go</strong><dd><code>Replace context.Background()
with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-1bb7d62cd5e7e79b93a2ac196e721568eb7356b61e3751d2ef4781f5a725ef1d">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_link_idtoken_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-8de432126fa0e0242bd7183c12a5759f7ba3d06593e38311a6b379485b2c7452">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_pat_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-4b905185be2ca4eaf99c16dd769958f6adfb6db2d2d01b528e54cfd36182d7fb">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_anonymous_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-c25dbd9375a284855b2297546ad1f6e2550bfaa189af9aea805d8a20c21fddea">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>

<td><strong>post_signin_email_password_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-20169cf1b0f6c102c29b882d28234333096dd5fc226ad1a92119e00206e4c26e">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_idtoken_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-d849cc9b72340eb39d633b2446f3223cb202e09cabdef07b5ce512f15fc129f2">+2/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_mfa_totp_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-2f07c5c0613472bcfad7967a8116602ffa8f33856de94380d50ccdbd95bec206">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_otp_email_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-8b00ba05ca046df6350ea7ebd3e3537b752b009847691497eb5d09c09f265b5c">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>

<td><strong>post_signin_otp_email_verify_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-df88ef70165a67033c322cc91cd5d0c28d7459f69c709ac9074fb8222e518a7f">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>

<td><strong>post_signin_passwordless_email_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-6cf1790ea2f14ead08fcbf57f06999577a8d5a6fc4879c55259e06c918d9bf24">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_pat_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-020127c3b0d584aa14d94f93ce33be359ce58e7fb9b893211d4edaaceedac9e9">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_webauthn_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-71a06b6b10627842b843348d8879303850ca5badbf947b37fd3df2e667c2bc88">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>

<td><strong>post_signin_webauthn_verify_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-1c449231790f6e56e26d47fecb200b1f2b3585ea9f80ad19ab8f905b01094a46">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>

<td><strong>post_signup_email_password_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-c7050138b811ec2f854c0dfa34ac1eb9f03831c1f682e6a677dfe16943cb5f84">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signup_webauthn_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-d90cf5c246e6e577eeafbd15f2ea2c408e2f986f189e856d4a8f232646973708">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>

<td><strong>post_signup_webauthn_verify_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-c93cb267e3fcbec34fe2f8c5dbc204bb6d2cbc9fff58597ad761da5a8e661c3c">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_token_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-dfb4a72aeccf26b3cfb4f1a91a0d2807896febd4b602cfca4b751636befde18a">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_user_deanonymize_test.go</strong><dd><code>Replace
context.Background() with t.Context()</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-c077333848bdcde6b8bc815156611f192435547d157d737b2ca0917866f22b45">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Additional
files</strong></td><td><details><summary>16 files</summary><table>
<tr>
  <td><strong>.golangci.yaml</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-9917ddc9f1c3304218f7269265b746d997c5c0615478177b5fceecd33ef47cb5">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>flake.nix</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-206b9ce276ab5971a2489d75eb1b12999d4bf3843b7988cbe8d687cfde61dea0">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>go.mod</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6">+34/-34</a>&nbsp;
</td>

</tr>

<tr>
  <td><strong>go.sum</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63">+66/-69</a>&nbsp;
</td>

</tr>

<tr>
  <td><strong>post_user_email_change_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-1cc2440c6e04141e9abc99d283a11e30ced4121e5f96377aed34d625bdfd2ab8">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>

<td><strong>post_user_email_send_verification_email_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-e3438fe2db9d9711db2af3603c1fe8d958ff471245d3695bb4dcc3219de75705">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>post_user_mfa_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-5795028fd6afc716636f4ca00cfb373dc3682a542051e7e70f9b1808ecf5f26e">+2/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>post_user_password_reset_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-ef3d18015291d93942987bb41c30132d066b0df39768694a8555d34d00f6f7f6">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>post_user_password_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-a0149a7dddf770ad3de4c8223e5691ff811d5f04c9b20a726e40de12cf76ce1e">+2/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>hibp_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-f00839be7ce580c1a8cf7a82041ac8879131e057318d06730274f78c336f9b80">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>email_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-15b6541fe822c5bba389b86f6988a6ef20b0b694703889f84acf4d5013df7c18">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>idtoken_test.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-329b609f83ff40defe79f2c984595b7b8cee9be2171da1c0ada41d2649c048ad">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>auth_schema_dump.sql</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-b25465e2d1263a553f7859fb72207fc7a8ce4a9e641969e8100306495b8d5965">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>db.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-4c4223e34371961b4e9566335915a222c25b701e7a1d65825857196a4c94736c">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>models.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-73b8d99da1821ef6f068193ecff3af6001c802243dd77e6dda0b4fe5313d874b">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td><strong>query.sql.go</strong></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/627/files#diff-442fde6e20ac506fb6bc13c00a7374ee9c33b183ffda72db4e49e1b013cd4cde">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-05-06 11:44:11 +02:00
David Barroso
50f7376c07 feat: migrate remaining mfa endpoints to go (#626)
It also fixes https://github.com/nhost/hasura-auth/issues/623

### **PR Type**
Enhancement, Tests


___

### **Description**
- Migrate remaining MFA endpoints to Go

- Add TOTP secret generation and MFA activation

- Update user MFA settings and TOTP validation

- Implement new API endpoints for MFA management


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>15
files</summary><table>
<tr>
<td><strong>server.gen.go</strong><dd><code>Add new MFA-related API
endpoints and handlers</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+208/-69</a></td>

</tr>

<tr>
<td><strong>types.gen.go</strong><dd><code>Add new MFA-related types and
constants</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+31/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>controller.go</strong><dd><code>Add new database client
methods for MFA</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-68eba6c5b3be94c2016a5c821351ad07c60e395226594ff744901f759e22af15">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>get_mfa_totp_generate.go</strong><dd><code>Implement TOTP
secret generation endpoint</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-31d8a6383ca16daae8def9cb3198660474942a4b82c1e48ee5268c3818f1a6b1">+54/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_email_password.go</strong><dd><code>Update TOTP
check in email password signin</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-83f8d4caba884eab3c2b16c14728377aeea5dd2fe3da1cc3d37b723e00486837">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_mfa_totp.go</strong><dd><code>Update TOTP
validation in MFA signin</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-dfcf31b6796ba3dd8b17989bea3dddad781d3240ebb9280dac02098525a14f8a">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_user_mfa.go</strong><dd><code>Implement user MFA
activation/deactivation endpoint</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-87201e793ffc4a91d768e9627a7415b0e5df9176f71b9f23e4a64b07eec78a5e">+111/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>totp.go</strong><dd><code>Enhance TOTP functionality with
secret generation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-70c35ba05eec9224b91a08bd3202c9262ed9903ea778db0ccd0ad711b04e538f">+49/-3</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>query.sql.go</strong><dd><code>Add new SQL queries for MFA
operations</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-442fde6e20ac506fb6bc13c00a7374ee9c33b183ffda72db4e49e1b013cd4cde">+32/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>index.ts</strong><dd><code>Remove MFA router from Express
routes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-4c1a276a826a5147689418cdbf9bde24c8326cedb30a61144fe7867bd99113ef">+0/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>index.ts</strong><dd><code>Remove MFA router
implementation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-540b400cec8c10f1f87c0d1ffb018396c8ab87c73a02602cf897f7b52f175da2">+0/-25</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>totp-generate.ts</strong><dd><code>Remove TOTP generation
handler</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-e947ed247ff45dd8c50b88bc5e372c8dcbc762338a5ed536dd82909346f204c6">+0/-46</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>index.ts</strong><dd><code>Remove MFA-related routes from
user router</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-14d43bc8570c6586d8a64c92ea9fe4ddd2a6fd85db68a8d0de8f7292c1476f36">+0/-18</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>mfa.ts</strong><dd><code>Remove MFA handler
implementation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-71fe86c9e0ccbb286842501197d2550fd555c8844d2c9adaeb8b8be8e2ef8ec9">+0/-92</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>query.sql</strong><dd><code>Add new SQL queries for MFA
operations</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-c19dd96472c44a7389d4d1f72e0a1879df1e06e8e4d333ca3cb6b6dfbe3083ef">+10/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>serve.go</strong><dd><code>Add MFA TOTP issuer configuration
option</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-a900f3187c126bacf5c9c5b1745b5d14bc583c01ab8f1ca84ae449751c224b68">+9/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Error
handling</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>errors.go</strong><dd><code>Add new MFA-related error types
and handlers</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-d2ebd3582b320c6db8161b6f3f90931cee507a68d9667ca1f6c88e8108ede569">+26/-2</a>&nbsp;
&nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>5
files</summary><table>
<tr>
<td><strong>get_mfa_totp_generate_test.go</strong><dd><code>Add tests
for TOTP secret generation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-f3713ebc3b23b6469bb6dc61b17c2511b8ba2c99dde26c5a71aabb0a5ae43383">+199/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>main_test.go</strong><dd><code>Update TOTP initialization in
tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-a13f50ba7fee39bdeff8c7f63e51af45b3e837d359608a042d7e2e8d50fb8b89">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>controller.go</strong><dd><code>Update mock controller with
new MFA methods</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-f1b1f168b0924b023c571d6274d53defef472a872f5fee4de1c4ae78959cc327">+56/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_mfa_totp_test.go</strong><dd><code>Update TOTP
tests for MFA signin</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-2f07c5c0613472bcfad7967a8116602ffa8f33856de94380d50ccdbd95bec206">+8/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_user_mfa_test.go</strong><dd><code>Add tests for user
MFA activation/deactivation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-5795028fd6afc716636f4ca00cfb373dc3682a542051e7e70f9b1808ecf5f26e">+444/-0</a>&nbsp;
</td>

</tr>
</table></details></td></tr><tr><td><strong>Bug
fix</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>workflows.go</strong><dd><code>Update session refresh token
validation</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-6aaacc47584f1edde5a01051611a7baffc583fc32b48df6d7fee39afa16a65cb">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>2
files</summary><table>
<tr>
<td><strong>go.mod</strong><dd><code>Update JWT library
version</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>go.sum</strong><dd><code>Update dependencies
checksums</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>openapi.yaml</strong><dd><code>Add new MFA endpoints to
OpenAPI specification</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/626/files#diff-9fe8f7da727ff26c02939aa060e0348d870e6dd95ba433f9f4d53a9a6967aca0">+69/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-04-23 10:16:44 +02:00
dependabot[bot]
7ba5584369 chore: bump Codium-ai/pr-agent from 0.27 to 0.28 (#624)
### **User description**
Bumps [Codium-ai/pr-agent](https://github.com/codium-ai/pr-agent) from
0.27 to 0.28.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codium-ai/pr-agent/releases">Codium-ai/pr-agent's
releases</a>.</em></p>
<blockquote>
<h2>v0.28</h2>
<h2><a
href="https://hub.docker.com/repository/docker/codiumai/pr-agent/tags">Docker
tags</a></h2>
<p>codiumai/pr-agent:0.28
codiumai/pr-agent:0.28-github_app
codiumai/pr-agent:0.28-bitbucket-app
codiumai/pr-agent:0.28-gitlab_webhook
codiumai/pr-agent:0.28-github_action
codiumai/pr-agent:0.28-azure_devops_webhook</p>
<h2>What's Changed</h2>
<ul>
<li>chore: add bedrock/us.anthropic.claude-3-7-sonnet-20250219-v1:0 by
<a
href="https://github.com/atsushi-ishibashi"><code>@​atsushi-ishibashi</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1594">qodo-ai/pr-agent#1594</a></li>
<li>docs: fix usage-guide/automations_and_usage.md in mistake link by <a
href="https://github.com/ryo-kagawa"><code>@​ryo-kagawa</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1604">qodo-ai/pr-agent#1604</a></li>
<li>docs: update model references to Claude 3.7 Sonnet and o3-mini
throug… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1607">qodo-ai/pr-agent#1607</a></li>
<li>fix: validate one-liner suggestions to prevent repeating existing
code by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1610">qodo-ai/pr-agent#1610</a></li>
<li>feat: add DeepInfra support by <a
href="https://github.com/muhammad-asn"><code>@​muhammad-asn</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1611">qodo-ai/pr-agent#1611</a></li>
<li>fix: repeat processing files to ignore by <a
href="https://github.com/congziqi77"><code>@​congziqi77</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1612">qodo-ai/pr-agent#1612</a></li>
<li>Support extended thinking for model
<code>claude-3-7-sonnet-20250219</code> by <a
href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1605">qodo-ai/pr-agent#1605</a></li>
<li>Fix default value for extended_thinking_max_output_tokens by <a
href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1614">qodo-ai/pr-agent#1614</a></li>
<li>Update improve.md by <a
href="https://github.com/hussam789"><code>@​hussam789</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1615">qodo-ai/pr-agent#1615</a></li>
<li>chore: update pr_reviewer_prompts.toml by <a
href="https://github.com/eltociear"><code>@​eltociear</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1626">qodo-ai/pr-agent#1626</a></li>
<li>Hl/update configs docs by <a
href="https://github.com/hussam789"><code>@​hussam789</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1625">qodo-ai/pr-agent#1625</a></li>
<li>docs: Update description of gitlab-webhook installation. by <a
href="https://github.com/thonic"><code>@​thonic</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1628">qodo-ai/pr-agent#1628</a></li>
<li>Update azuredevops_provider.py by <a
href="https://github.com/cdornano"><code>@​cdornano</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1636">qodo-ai/pr-agent#1636</a></li>
<li>doc: Add info about ollama context length by <a
href="https://github.com/Octoslav"><code>@​Octoslav</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1637">qodo-ai/pr-agent#1637</a></li>
<li>Adding a new tool: /help_docs by <a
href="https://github.com/sharoneyal"><code>@​sharoneyal</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1644">qodo-ai/pr-agent#1644</a></li>
<li>Bugfix: Incorrect git url in case of GitHub app by <a
href="https://github.com/sharoneyal"><code>@​sharoneyal</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1647">qodo-ai/pr-agent#1647</a></li>
<li>Update Docs: Company Codebase Overview, RAG Integration &amp;
Configuration by <a
href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1648">qodo-ai/pr-agent#1648</a></li>
<li>fix: Logging and Commenting by <a
href="https://github.com/ishaansehgal99"><code>@​ishaansehgal99</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1634">qodo-ai/pr-agent#1634</a></li>
<li>Add support for publishing comments on issues in GitHub provider by
<a href="https://github.com/sharoneyal"><code>@​sharoneyal</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1651">qodo-ai/pr-agent#1651</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/atsushi-ishibashi"><code>@​atsushi-ishibashi</code></a>
made their first contribution in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1594">qodo-ai/pr-agent#1594</a></li>
<li><a
href="https://github.com/ryo-kagawa"><code>@​ryo-kagawa</code></a> made
their first contribution in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1604">qodo-ai/pr-agent#1604</a></li>
<li><a
href="https://github.com/muhammad-asn"><code>@​muhammad-asn</code></a>
made their first contribution in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1611">qodo-ai/pr-agent#1611</a></li>
<li><a
href="https://github.com/congziqi77"><code>@​congziqi77</code></a> made
their first contribution in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1612">qodo-ai/pr-agent#1612</a></li>
<li><a href="https://github.com/thonic"><code>@​thonic</code></a> made
their first contribution in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1628">qodo-ai/pr-agent#1628</a></li>
<li><a href="https://github.com/cdornano"><code>@​cdornano</code></a>
made their first contribution in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1636">qodo-ai/pr-agent#1636</a></li>
<li><a href="https://github.com/Octoslav"><code>@​Octoslav</code></a>
made their first contribution in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1637">qodo-ai/pr-agent#1637</a></li>
<li><a
href="https://github.com/sharoneyal"><code>@​sharoneyal</code></a> made
their first contribution in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1644">qodo-ai/pr-agent#1644</a></li>
<li><a
href="https://github.com/ishaansehgal99"><code>@​ishaansehgal99</code></a>
made their first contribution in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1634">qodo-ai/pr-agent#1634</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/qodo-ai/pr-agent/compare/v0.27...v0.28">https://github.com/qodo-ai/pr-agent/compare/v0.27...v0.28</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7d57edf959"><code>7d57edf</code></a>
Improve help_docs documentation with clearer structure and usage
examples</li>
<li><a
href="6950b3ca6b"><code>6950b3c</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1658">#1658</a>
from qodo-ai/es/bugfix_on_help_docs_no_references_wh...</li>
<li><a
href="e422f50cfe"><code>e422f50</code></a>
Fix for bug in get_canonical_url_parts when a new issue created, without
git ...</li>
<li><a
href="66a667d509"><code>66a667d</code></a>
Update main readme file + improve help docs (<a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1653">#1653</a>)</li>
<li><a
href="482cd7c680"><code>482cd7c</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1651">#1651</a>
from qodo-ai/es/github_publish_non_pr_comment</li>
<li><a
href="991a866368"><code>991a866</code></a>
documents' link generation: Make sure prefix ends with '/'</li>
<li><a
href="fcd9416129"><code>fcd9416</code></a>
Replace Qodo Merge references with PR-Agent in Bitbucket
documentation</li>
<li><a
href="255e1d0fc1"><code>255e1d0</code></a>
Missing class member</li>
<li><a
href="7117e9fe0e"><code>7117e9f</code></a>
Github Provider: Support publishing a comment on a non pr issue</li>
<li><a
href="b42841fcc4"><code>b42841f</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1649">#1649</a>
from qodo-ai/hl/global_best_practices</li>
<li>Additional commits viewable in <a
href="https://github.com/codium-ai/pr-agent/compare/v0.27...v0.28">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Codium-ai/pr-agent&package-manager=github_actions&previous-version=0.27&new-version=0.28)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>


___

### **PR Type**
Enhancement


___

### **Description**
- Update PR-Agent version from 0.27 to 0.28

- Improve CI/CD workflow with latest features


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>gen_ai_review.yaml</strong><dd><code>Bump PR-Agent
version in GitHub Actions workflow</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/gen_ai_review.yaml

- Updated Codium-ai/pr-agent action version from 0.27 to 0.28


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/624/files#diff-d1e4c772e0acb5ce4891df2dd94ba58ffaf6393e8f75493ec7e10cbce1c4992c">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-14 08:35:08 +02:00
dependabot[bot]
5bee6de6bd chore: bump cachix/install-nix-action from 30 to 31 (#620)
### **User description**
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from 30 to 31.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v31</h2>
<h2>What's Changed</h2>
<ul>
<li>nix: 2.24.9 -&gt; 2.25.2 by <a
href="https://github.com/Mic92"><code>@​Mic92</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/218">cachix/install-nix-action#218</a></li>
<li>ci: fix latest installer tests by <a
href="https://github.com/sandydoo"><code>@​sandydoo</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/220">cachix/install-nix-action#220</a></li>
<li>ci: add ubuntu-24.04-arm to matrix by <a
href="https://github.com/msgilligan"><code>@​msgilligan</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/221">cachix/install-nix-action#221</a></li>
<li>nix: 2.25.2 -&gt; 2.26.2 by <a
href="https://github.com/Mic92"><code>@​Mic92</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/226">cachix/install-nix-action#226</a></li>
<li>nix: 2.26.2 -&gt; 2.26.3 by <a
href="https://github.com/sandydoo"><code>@​sandydoo</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/228">cachix/install-nix-action#228</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/msgilligan"><code>@​msgilligan</code></a> made
their first contribution in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/221">cachix/install-nix-action#221</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/cachix/install-nix-action/compare/v30...v31">https://github.com/cachix/install-nix-action/compare/v30...v31</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="02a151ada4"><code>02a151a</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/228">#228</a>
from cachix/bump-nix</li>
<li><a
href="066004291c"><code>0660042</code></a>
nix: 2.26.2 -&gt; 2.26.3</li>
<li><a
href="e8dbd0c992"><code>e8dbd0c</code></a>
docs: update readme with latest version</li>
<li><a
href="91a0719595"><code>91a0719</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/226">#226</a>
from Mic92/nix-update</li>
<li><a
href="d81eadf041"><code>d81eadf</code></a>
nix: 2.25.2 -&gt; 2.26.2</li>
<li><a
href="3d69a1d4d2"><code>3d69a1d</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/221">#221</a>
from msgilligan/msgilligan/github-test-aarch64-linux</li>
<li><a
href="265a04a520"><code>265a04a</code></a>
GitHub test.yml: add ubuntu-24.04-arm to matrix</li>
<li><a
href="89fd1e98db"><code>89fd1e9</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/220">#220</a>
from cachix/fix-master-tests</li>
<li><a
href="a76df16350"><code>a76df16</code></a>
ci: bump nixpkgs channel</li>
<li><a
href="a49b703498"><code>a49b703</code></a>
ci: fix act test</li>
<li>Additional commits viewable in <a
href="https://github.com/cachix/install-nix-action/compare/v30...v31">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/install-nix-action&package-manager=github_actions&previous-version=30&new-version=31)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>


___

### **PR Type**
Enhancement


___

### **Description**
- Update cachix/install-nix-action from v30 to v31

- Modify GitHub Actions workflows for build and check


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>wf_build_artifacts.yaml</strong><dd><code>Update Nix
installation action version</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/wf_build_artifacts.yaml

- Update cachix/install-nix-action from v30 to v31


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/620/files#diff-63d6f3e2e5894df4d88cf2c82b3d0c90e7b0b7c8ca9da25a3d46f35f15270fb0">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>wf_check.yaml</strong><dd><code>Update Nix installation
action version</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/wf_check.yaml

- Update cachix/install-nix-action from v30 to v31


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/620/files#diff-c2ecea6736037ba6304681d744d612d44d7681788d2fbc58ce223cf52ecefa43">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2025-04-14 08:34:55 +02:00
David Barroso
c1b4d5abc5 feat: migrate /signin/mfa/totp to go (#622)
### **PR Type**
Enhancement, Tests


___

### **Description**
- Migrate /signin/mfa/totp endpoint to Go

- Add TOTP validation functionality

- Update API schema for MFA TOTP

- Implement unit tests for new endpoint


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>9
files</summary><table>
<tr>
<td><strong>server.gen.go</strong><dd><code>Add TOTP signin endpoint and
response handlers</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+140/-68</a></td>

</tr>

<tr>
<td><strong>types.gen.go</strong><dd><code>Update API types for TOTP
signin</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+15/-5</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>controller.go</strong><dd><code>Add TOTP functionality to
Controller struct</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-68eba6c5b3be94c2016a5c821351ad07c60e395226594ff744901f759e22af15">+3/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_mfa_totp.go</strong><dd><code>Implement TOTP
signin endpoint handler</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-dfcf31b6796ba3dd8b17989bea3dddad781d3240ebb9280dac02098525a14f8a">+50/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>totp.go</strong><dd><code>Implement TOTP validation
functionality</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-70c35ba05eec9224b91a08bd3202c9262ed9903ea778db0ccd0ad711b04e538f">+38/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>index.ts</strong><dd><code>Remove TOTP signin route from
TypeScript</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-26afd2e4ccfcac5d8a5fdbd1312ac77bfa6d2269f06b7180b4ca75c8d523d642">+0/-16</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>index.ts</strong><dd><code>Remove TOTP export from
TypeScript</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-74962d50d5d71f23f68d4d48f168dc585e704abd4f549f4f4ff169495cebaa70">+0/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>sms.ts</strong><dd><code>Remove SMS MFA handler from
TypeScript</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-bf8048ebbed7dd50c2ebf62217ca47d0744b781a0d8c893e574fa9b7c736eb26">+0/-33</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>totp.ts</strong><dd><code>Remove TOTP handler from
TypeScript</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-c7a4205191155c458df838ac6b59941ef359c583b76cb3e7a1fa1c8bf747cf24">+0/-58</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>3 files</summary><table>
<tr>
<td><strong>config.go</strong><dd><code>Add MFA configuration
option</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-6ed50c9d309f6e7cf03742253995dfc65ae67702ae9c4aeb650b24a9b87cf377">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>serve.go</strong><dd><code>Add MFA flag and update
controller initialization</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-a900f3187c126bacf5c9c5b1745b5d14bc583c01ab8f1ca84ae449751c224b68">+16/-1</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>config.go</strong><dd><code>Add MfaEnabled field to Config
struct</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-77fe34a234b413cd5f46aa02ee1cb93864fc387e765cd7dd1a54efd7ac9a4eb0">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Error
handling</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>errors.go</strong><dd><code>Add new error types for
TOTP</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-d2ebd3582b320c6db8161b6f3f90931cee507a68d9667ca1f6c88e8108ede569">+22/-1</a>&nbsp;
&nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>3
files</summary><table>
<tr>
<td><strong>main_test.go</strong><dd><code>Update test utilities for
TOTP support</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-a13f50ba7fee39bdeff8c7f63e51af45b3e837d359608a042d7e2e8d50fb8b89">+14/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_mfa_totp_test.go</strong><dd><code>Add
comprehensive tests for TOTP signin</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-2f07c5c0613472bcfad7967a8116602ffa8f33856de94380d50ccdbd95bec206">+376/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>validator_test.go</strong><dd><code>Update test
configuration for MFA</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-3f42f5f887ad54ac2f169b2629a4d17be0917e55ca60bfac885300953c8cd5f2">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>2
files</summary><table>
<tr>
<td><strong>go.mod</strong><dd><code>Add OTP library
dependency</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>go.sum</strong><dd><code>Update dependency
checksums</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63">+4/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>openapi.yaml</strong><dd><code>Update OpenAPI schema for
TOTP signin</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/622/files#diff-9fe8f7da727ff26c02939aa060e0348d870e6dd95ba433f9f4d53a9a6967aca0">+43/-8</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-04-01 16:38:35 +02:00
David Barroso
74396856ef feat: port /signin/anonymous to go (#621)
### **PR Type**
Enhancement


___

### **Description**
- Port /signin/anonymous endpoint to Go

- Add anonymous user support to API

- Update database queries for anonymous users

- Add configuration for enabling anonymous users


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>9
files</summary><table>
<tr>
<td><strong>server.gen.go</strong><dd><code>Add anonymous signin
endpoint to API server</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+141/-66</a></td>

</tr>

<tr>
<td><strong>types.gen.go</strong><dd><code>Add types for anonymous
signin request/response</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+17/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>post_signin_anonymous.go</strong><dd><code>Implement
anonymous signin endpoint handler</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-a664467412bdd550d6954e553c8f661d028224b123ccfa82c736da8918238527">+67/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>post_signup_email_password.go</strong><dd><code>Set
IsAnonymous flag for email/password signup</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-5fffb003b4ec056dd9d85d00c361634598661daa48f97d5225ec9150dc566124">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>workflows.go</strong><dd><code>Implement SignupAnonymousUser
workflow</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-6aaacc47584f1edde5a01051611a7baffc583fc32b48df6d7fee39afa16a65cb">+80/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>query.sql.go</strong><dd><code>Update SQL query for
inserting anonymous users</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-442fde6e20ac506fb6bc13c00a7374ee9c33b183ffda72db4e49e1b013cd4cde">+6/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>anonymous.ts</strong><dd><code>Remove TypeScript
implementation of anonymous signin</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-67e50ec5bc7703c07c92412150fba2d8b6e4a21e846379214fd608731013d7f7">+0/-49</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>index.ts</strong><dd><code>Remove anonymous signin route
from TypeScript</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-26afd2e4ccfcac5d8a5fdbd1312ac77bfa6d2269f06b7180b4ca75c8d523d642">+0/-16</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>query.sql</strong><dd><code>Update SQL query to include
is_anonymous field</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-c19dd96472c44a7389d4d1f72e0a1879df1e06e8e4d333ca3cb6b6dfbe3083ef">+2/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>3 files</summary><table>
<tr>
<td><strong>config.go</strong><dd><code>Add configuration for enabling
anonymous users</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-6ed50c9d309f6e7cf03742253995dfc65ae67702ae9c4aeb650b24a9b87cf377">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>serve.go</strong><dd><code>Add CLI flag for enabling
anonymous users</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-a900f3187c126bacf5c9c5b1745b5d14bc583c01ab8f1ca84ae449751c224b68">+8/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>config.go</strong><dd><code>Add AnonymousUsersEnabled to
controller config</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-77fe34a234b413cd5f46aa02ee1cb93864fc387e765cd7dd1a54efd7ac9a4eb0">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Error
handling</strong></td><td><details><summary>1 files</summary><table>
<tr>
<td><strong>errors.go</strong><dd><code>Add error for disabled anonymous
users</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-d2ebd3582b320c6db8161b6f3f90931cee507a68d9667ca1f6c88e8108ede569">+5/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>5
files</summary><table>
<tr>
<td><strong>post_signin_anonymous_test.go</strong><dd><code>Add tests
for anonymous signin endpoint</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-c25dbd9375a284855b2297546ad1f6e2550bfaa189af9aea805d8a20c21fddea">+423/-0</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>post_signup_email_password_test.go</strong><dd><code>Update
tests for IsAnonymous flag in signup</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-c7050138b811ec2f854c0dfa34ac1eb9f03831c1f682e6a677dfe16943cb5f84">+7/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>validator_test.go</strong><dd><code>Add
AnonymousUsersEnabled to test config</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-3f42f5f887ad54ac2f169b2629a4d17be0917e55ca60bfac885300953c8cd5f2">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>tokens.test.ts</strong><dd><code>Update test expectation for
MFA field</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-132ee7c1c459de8ddbcf82d70b938fd10f91b986114d393d2ece55d5126b4278">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>anonymous.test.ts</strong><dd><code>Update test expectation
for MFA field</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-1cdc1ae135bd59b27586ef55c636d998cf0f1e17c216512c344a676d6c3f5cf3">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>flake.nix</strong><dd><code>Update oapi-codegen version and
configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-206b9ce276ab5971a2489d75eb1b12999d4bf3843b7988cbe8d687cfde61dea0">+15/-0</a>&nbsp;
&nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>openapi.yaml</strong><dd><code>Add OpenAPI specification for
anonymous signin</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/621/files#diff-9fe8f7da727ff26c02939aa060e0348d870e6dd95ba433f9f4d53a9a6967aca0">+53/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-03-28 08:39:32 +01:00
antoinecaputo
0a79a92f45 feat: refresh session with new refresh token (#617)
This PR implements token rotation for refresh tokens, improving security
by invalidating the old refresh tokens when a new one is generated.

- Edit the `RefreshTokenAndGetUserRoles` query to update both the
`expires_at` and `refresh_token_hash` fields
- No additional database calls

### Checklist

- [ ] No breaking changes
- [x] Tests pass
- [x] New features have new tests
- [x] Documentation is updated

### Breaking changes

It may affect clients that don't store the new refresh token from the
`/token` session response.

Clients must store the new refresh token received in each session
response.

If you are using nhost's official SDK this change is transparent and has
no impact.

### Tests

#### Coverage

The `invalid refresh token` test cover the case where a deleted refresh
token is used.

#### Missing uuid mock

The `uuid.New()` call in `UpdateSession` workflow isn't mocked in tests.

Therefore, the `RefreshTokenAndGetUserRolesParams` matcher will only
expect the `NewRefreshTokenHash` value to have changed.

However, the `RefreshTokenId` field is correctly updated with the mock
return.

### Documentation

Updated `docs/workflows/refresh-token.md` to add the refresh tokens
update.

Closes #416

---------

Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2025-03-22 06:40:28 +01:00
David Barroso
87f3c7fcf8 feat: drop user_providers_user_id_provider_id_key to allow connecting multiple oauth accounts (#618)
Fixes https://github.com/nhost/nhost/issues/3203

### **PR Type**
Enhancement


___

### **Description**
- Drop unique constraint on user_id and provider_id

- Allow connecting multiple OAuth accounts per user

- Update auth schema and add migration script


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>auth_schema_dump.sql</strong><dd><code>Remove unique
constraint from auth schema</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

go/sql/auth_schema_dump.sql

<li>Remove unique constraint on <code>user_id</code> and
<code>provider_id</code><br> <li> Delete SQL statement for
<code>user_providers_user_id_provider_id_key</code>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/618/files#diff-b25465e2d1263a553f7859fb72207fc7a8ce4a9e641969e8100306495b8d5965">+0/-8</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>

<summary><strong>00017_drop_user_providers_user_id_provider_id_key.sql</strong><dd><code>Add
migration to drop unique constraint</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

migrations/00017_drop_user_providers_user_id_provider_id_key.sql

<li>Add SQL statement to drop
<code>user_providers_user_id_provider_id_key</code> <br>constraint


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/618/files#diff-2371dbb1bec2a5ffe16726908cc2aa8fd7ac4fe0dcedf3b3c41d67f1c3d12a3b">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-03-22 06:39:59 +01:00
David Barroso
a941e237b5 chore: ci: bring back nix cache (#619)
### **PR Type**
Enhancement, Configuration changes


___

### **Description**
- Implement Nix cache for faster builds

- Add permissions check for PR runs

- Update CI workflows for better security

- Refactor Docker image building process


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>checks.yaml</strong><dd><code>Add permissions check and
Nix cache to checks workflow</code>&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/checks.yaml

<li>Add permissions check job<br> <li> Include Nix cache secrets in
workflow<br> <li> Remove 'safe_to_test' label after checks<br> <li>
Update job dependencies and secrets


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/619/files#diff-4af11422a4987e947e5a47adead7a30d32cdb2db82e2d3fe36f8e6cbe84d5ac5">+35/-1</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>wf_build_artifacts.yaml</strong><dd><code>Refactor
build artifacts workflow with Nix caching</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/wf_build_artifacts.yaml

<li>Replace DOCKER input with AWS and Nix cache secrets<br> <li> Update
runner OS and architecture<br> <li> Implement Nix cache verification and
pushing<br> <li> Refactor Docker image building process


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/619/files#diff-63d6f3e2e5894df4d88cf2c82b3d0c90e7b0b7c8ca9da25a3d46f35f15270fb0">+45/-24</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>wf_check.yaml</strong><dd><code>Enhance check workflow
with Nix caching and AWS integration</code></dd></summary>
<hr>

.github/workflows/wf_check.yaml

<li>Add AWS and Nix cache configuration<br> <li> Implement build
verification using Nix store<br> <li> Update runner to use ARM
architecture<br> <li> Add workflow telemetry collection


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/619/files#diff-c2ecea6736037ba6304681d744d612d44d7681788d2fbc58ce223cf52ecefa43">+43/-30</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>wf_docker_push_image.yaml</strong><dd><code>Simplify
Docker manifest creation in push workflow</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/wf_docker_push_image.yaml

- Simplify Docker manifest creation command


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/619/files#diff-a0b87bcebe9e143aeb58a882e2bcf531709c6950d6845ababf624eb125eed691">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>release.yaml</strong><dd><code>Update release workflow
with Nix cache secrets</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/release.yaml

<li>Add Nix cache secrets to jobs<br> <li> Remove DOCKER input, likely
handled elsewhere


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/619/files#diff-e426ed45842837026e10e66af23d9c7077e89eacbe6958ce7cb991130ad05ada">+9/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-03-18 16:51:12 +01:00
dependabot[bot]
9ba3c6c326 chore: bump cachix/install-nix-action from 30 to 31 (#615)
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from 30 to 31.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v31</h2>
<h2>What's Changed</h2>
<ul>
<li>nix: 2.24.9 -&gt; 2.25.2 by <a
href="https://github.com/Mic92"><code>@​Mic92</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/218">cachix/install-nix-action#218</a></li>
<li>ci: fix latest installer tests by <a
href="https://github.com/sandydoo"><code>@​sandydoo</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/220">cachix/install-nix-action#220</a></li>
<li>ci: add ubuntu-24.04-arm to matrix by <a
href="https://github.com/msgilligan"><code>@​msgilligan</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/221">cachix/install-nix-action#221</a></li>
<li>nix: 2.25.2 -&gt; 2.26.2 by <a
href="https://github.com/Mic92"><code>@​Mic92</code></a> in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/226">cachix/install-nix-action#226</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/msgilligan"><code>@​msgilligan</code></a> made
their first contribution in <a
href="https://redirect.github.com/cachix/install-nix-action/pull/221">cachix/install-nix-action#221</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/cachix/install-nix-action/compare/v30...v31">https://github.com/cachix/install-nix-action/compare/v30...v31</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="91a0719595"><code>91a0719</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/226">#226</a>
from Mic92/nix-update</li>
<li><a
href="d81eadf041"><code>d81eadf</code></a>
nix: 2.25.2 -&gt; 2.26.2</li>
<li><a
href="3d69a1d4d2"><code>3d69a1d</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/221">#221</a>
from msgilligan/msgilligan/github-test-aarch64-linux</li>
<li><a
href="265a04a520"><code>265a04a</code></a>
GitHub test.yml: add ubuntu-24.04-arm to matrix</li>
<li><a
href="89fd1e98db"><code>89fd1e9</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/220">#220</a>
from cachix/fix-master-tests</li>
<li><a
href="a76df16350"><code>a76df16</code></a>
ci: bump nixpkgs channel</li>
<li><a
href="a49b703498"><code>a49b703</code></a>
ci: fix act test</li>
<li><a
href="f3f544c44b"><code>f3f544c</code></a>
ci: fix latest installer tests</li>
<li><a
href="14344b39ca"><code>14344b3</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/218">#218</a>
from Mic92/nix-upgrade</li>
<li><a
href="b1deb06f62"><code>b1deb06</code></a>
nix: 2.24.9 -&gt; 2.25.2</li>
<li>See full diff in <a
href="https://github.com/cachix/install-nix-action/compare/v30...v31">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/install-nix-action&package-manager=github_actions&previous-version=30&new-version=31)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 10:34:03 +01:00
David Barroso
0f9adf9698 feat: added support for smtp login authentication (#613)
### **User description**
Fixes #612


___

### **PR Type**
Enhancement


___

### **Description**
- Added support for SMTP LOGIN authentication method

- Removed deprecation warning for LOGIN method

- Replaced PLAIN auth with LOGIN auth for LOGIN method


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>email.go</strong><dd><code>Implement SMTP LOGIN
authentication</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/cmd/email.go

<li>Implemented LOGIN authentication for SMTP<br> <li> Removed
deprecation warning for LOGIN method<br> <li> Replaced PLAIN auth with
LOGIN auth for LOGIN method


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/613/files#diff-a6364ed092c8bd789262322ec1e0108c274323462a0af0b7c7dd10a07f0bc449">+1/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-03-07 11:35:43 +01:00
dependabot[bot]
9aa6b02523 chore: bump Codium-ai/pr-agent from 0.26 to 0.27 (#611)
Bumps [Codium-ai/pr-agent](https://github.com/codium-ai/pr-agent) from
0.26 to 0.27.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codium-ai/pr-agent/releases">Codium-ai/pr-agent's
releases</a>.</em></p>
<blockquote>
<h2>v0.27</h2>
<h2><a
href="https://hub.docker.com/repository/docker/codiumai/pr-agent/tags">Docker
tags</a></h2>
<p>codiumai/pr-agent:0.27
codiumai/pr-agent:0.27-github_app
codiumai/pr-agent:0.27-bitbucket-app
codiumai/pr-agent:0.27-gitlab_webhook
codiumai/pr-agent:0.27-github_action
codiumai/pr-agent:0.27-azure_devops_webhook</p>
<h2>What's Changed</h2>
<ul>
<li>Support pull requests in personal spaces in Bitbucket Server by <a
href="https://github.com/vishwamartur"><code>@​vishwamartur</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1406">qodo-ai/pr-agent#1406</a></li>
<li>docs: update FAQ with new questions and improve formatting by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1430">qodo-ai/pr-agent#1430</a></li>
<li>Add documentation for <code>/implement</code> tool and enhance
<code>/test</code> tool references
by <a href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1433">qodo-ai/pr-agent#1433</a></li>
<li>Tr/ollama by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1434">qodo-ai/pr-agent#1434</a></li>
<li>fix : pr type rendering with markers by <a
href="https://github.com/benedict-lee"><code>@​benedict-lee</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1442">qodo-ai/pr-agent#1442</a></li>
<li>fix : support ai title with markers by <a
href="https://github.com/benedict-lee"><code>@​benedict-lee</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1441">qodo-ai/pr-agent#1441</a></li>
<li>fix: refine code suggestions prompts and avoid package-related
comments by <a href="https://github.com/mrT23"><code>@​mrT23</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1446">qodo-ai/pr-agent#1446</a></li>
<li>docs: add missing word by <a
href="https://github.com/pdecat"><code>@​pdecat</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1448">qodo-ai/pr-agent#1448</a></li>
<li>fix(azure-provider): handle renamed files as new files by <a
href="https://github.com/med8bra"><code>@​med8bra</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1452">qodo-ai/pr-agent#1452</a></li>
<li>Support deepseek-chat model by <a
href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1457">qodo-ai/pr-agent#1457</a></li>
<li>fix(local_git): add interface func stubs for git local provider by
<a
href="https://github.com/polacekpavel"><code>@​polacekpavel</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1455">qodo-ai/pr-agent#1455</a></li>
<li>docs: add target blank to external links in documentation by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1467">qodo-ai/pr-agent#1467</a></li>
<li>Add <code>vertex_ai/gemini-2.0-flash-exp</code> by <a
href="https://github.com/yu-iskw"><code>@​yu-iskw</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1466">qodo-ai/pr-agent#1466</a></li>
<li>README: Replace Codium and PR-Agent with Qodo and Qodo-Merge by <a
href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1471">qodo-ai/pr-agent#1471</a></li>
<li>Remove false log that file was modified, but no patch found for
bitbucket server by <a
href="https://github.com/gryphon-ops"><code>@​gryphon-ops</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1469">qodo-ai/pr-agent#1469</a></li>
<li>Add support model deepseek/deepseek-reasoner by <a
href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1473">qodo-ai/pr-agent#1473</a></li>
<li>docs: reorganize installation documentation structure by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1475">qodo-ai/pr-agent#1475</a></li>
<li>refactor: simplify review effort label format and remove maximal
effo… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1477">qodo-ai/pr-agent#1477</a></li>
<li>Add <code>IMPLEMENT</code> tool and reorganize help message content
by <a href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1484">qodo-ai/pr-agent#1484</a></li>
<li>feat: enhance ticket compliance analysis with human verification
tracking by <a
href="https://github.com/hussam789"><code>@​hussam789</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1486">qodo-ai/pr-agent#1486</a></li>
<li>Add GitHub issue templates for bug reports and feature requests
by <a href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1478">qodo-ai/pr-agent#1478</a></li>
<li>Add CONTRIBUTING.md with contribution guidelines and setup
instructions
by <a href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1500">qodo-ai/pr-agent#1500</a></li>
<li>fix: add fallback for parsing AI responses with leading '+' symbols
by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1506">qodo-ai/pr-agent#1506</a></li>
<li>Use <code>pip install</code> with <code>--no-cache-dir</code> in
Dockerfiles by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1510">qodo-ai/pr-agent#1510</a></li>
<li>Define user_message_only_models list for using user prompt only
model by <a
href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1509">qodo-ai/pr-agent#1509</a></li>
<li>feat: improve code suggestions table with impact levels and styling
by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1514">qodo-ai/pr-agent#1514</a></li>
<li>Create CODE_OF_CONDUCT.md by <a
href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1515">qodo-ai/pr-agent#1515</a></li>
<li>Create SECURITY.md by <a
href="https://github.com/hussam789"><code>@​hussam789</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1517">qodo-ai/pr-agent#1517</a></li>
<li>docs: update README with new design and remove outdated news by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1522">qodo-ai/pr-agent#1522</a></li>
<li>fix: update review effort label format to use X/5 notation by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1532">qodo-ai/pr-agent#1532</a></li>
<li>feat: improve help tool with markdown header formatting and error
han… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in
<a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1534">qodo-ai/pr-agent#1534</a></li>
<li>Add : pull_request_target event on GitHub Actions integration by <a
href="https://github.com/hi120ki"><code>@​hi120ki</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1531">qodo-ai/pr-agent#1531</a></li>
<li>Use <code>pip install</code> with <code>--no-cache-dir</code> in
<code>Dockerfile.github_action</code> by <a
href="https://github.com/PeterDaveHello"><code>@​PeterDaveHello</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1536">qodo-ai/pr-agent#1536</a></li>
<li>Refactoring <code>LiteLLMAIHandler</code> class for better using
reasoning models by <a
href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1537">qodo-ai/pr-agent#1537</a></li>
<li>Support generally available <code>gemini-2.0-flash</code> by <a
href="https://github.com/yu-iskw"><code>@​yu-iskw</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1539">qodo-ai/pr-agent#1539</a></li>
<li>Update README.md by <a
href="https://github.com/AdamWalkerQodo"><code>@​AdamWalkerQodo</code></a>
in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1550">qodo-ai/pr-agent#1550</a></li>
<li>feat: add support for custom reasoning models by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/qodo-ai/pr-agent/pull/1551">qodo-ai/pr-agent#1551</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7cf521c001"><code>7cf521c</code></a>
fix: improve null safety in GitLab webhook handler</li>
<li><a
href="e71c0f1805"><code>e71c0f1</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1586">#1586</a>
from qodo-ai/tr/docs245</li>
<li><a
href="8182a4afc0"><code>8182a4a</code></a>
docs: update default model to o3-mini and improve language configuration
inst...</li>
<li><a
href="3817aa2868"><code>3817aa2</code></a>
fix: remove redundant temperature logging in litellm handler</li>
<li><a
href="94a8606d24"><code>94a8606</code></a>
fix: update default configuration values for publishing and
verbosity</li>
<li><a
href="af635650f1"><code>af63565</code></a>
fix: improve response language handling and configuration
documentation</li>
<li><a
href="222f276959"><code>222f276</code></a>
docs: add language configuration documentation and update changelog</li>
<li><a
href="9a32e94b3e"><code>9a32e94</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1579">#1579</a>
from qodo-ai/response-language-configuration</li>
<li><a
href="7c56eee701"><code>7c56eee</code></a>
Update README.md</li>
<li><a
href="48b3c69c10"><code>48b3c69</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1575">#1575</a>
from GOOD21/feature/draft-ready-trigger</li>
<li>Additional commits viewable in <a
href="https://github.com/codium-ai/pr-agent/compare/v0.26...v0.27">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Codium-ai/pr-agent&package-manager=github_actions&previous-version=0.26&new-version=0.27)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-04 09:59:55 +01:00
dependabot[bot]
c5f7101432 chore: bump nixbuild/nix-quick-install-action from 29 to 30 (#609)
Bumps
[nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action)
from 29 to 30.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/releases">nixbuild/nix-quick-install-action's
releases</a>.</em></p>
<blockquote>
<h2>nixbuild/nix-quick-install-action@v30</h2>
<h2>Changes</h2>
<ul>
<li>
<p>Remove Nix versions: 2.18.8, 2.19.6, 2.20.8, 2.21.4, 2.23.3</p>
</li>
<li>
<p>Bump minor Nix versions: 2.24.9 -&gt; 2.24.12
2.21.0 -&gt; 2.21.4.</p>
</li>
<li>
<p>Add Nix versions: 2.25.5, 2.26.1</p>
</li>
<li>
<p>Bump default Nix version: 2.24.9 -&gt; 2.24.12</p>
</li>
<li>
<p>Add support for <code>ubuntu-24.04-arm</code> (aarch64-linux)
runners.</p>
</li>
<li>
<p>Enable support for KVM in builds. Can be turned off with the new
<code>enable_kvm</code>
configuration option.</p>
</li>
</ul>
<h2>Supported Nix Versions on x86_64-linux runners</h2>
<ul>
<li>2.26.1</li>
<li>2.25.5</li>
<li>2.24.12</li>
<li>2.3.18</li>
</ul>
<h2>Supported Nix Versions on aarch64-linux runners</h2>
<ul>
<li>2.26.1</li>
<li>2.25.5</li>
<li>2.24.12</li>
</ul>
<h2>Supported Nix Versions on x86_64-darwin runners</h2>
<ul>
<li>2.26.1</li>
<li>2.25.5</li>
<li>2.24.12</li>
<li>2.3.18</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE">nixbuild/nix-quick-install-action's
changelog</a>.</em></p>
<blockquote>
<p>v30</p>
<h2>Changes</h2>
<ul>
<li>
<p>Remove Nix versions: 2.18.8, 2.19.6, 2.20.8, 2.21.4, 2.23.3</p>
</li>
<li>
<p>Bump minor Nix versions: 2.24.9 -&gt; 2.24.12
2.21.0 -&gt; 2.21.4.</p>
</li>
<li>
<p>Add Nix versions: 2.25.5, 2.26.1</p>
</li>
<li>
<p>Bump default Nix version: 2.24.9 -&gt; 2.24.12</p>
</li>
<li>
<p>Add support for <code>ubuntu-24.04-arm</code> (aarch64-linux)
runners.</p>
</li>
<li>
<p>Enable support for KVM in builds. Can be turned off with the new
<code>enable_kvm</code>
configuration option.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5bb6a3b3ab"><code>5bb6a3b</code></a>
Release v30</li>
<li><a
href="607b4cf724"><code>607b4cf</code></a>
Remove outdated documentation (fixes <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/57">#57</a>)</li>
<li><a
href="5f5c23a20a"><code>5f5c23a</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/52">#52</a>
from azuwis/macos-volume</li>
<li><a
href="9f331f3772"><code>9f331f3</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/59">#59</a>
from nixbuild/readd_nix_2_3</li>
<li><a
href="904096fd8f"><code>904096f</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/56">#56</a>
from Smona/enable-kvm-on-linux</li>
<li><a
href="acdadbc3a6"><code>acdadbc</code></a>
Nix 2.3 doesn't work on aarch64-linux for some reason</li>
<li><a
href="0006832f24"><code>0006832</code></a>
ci: Fix syntax</li>
<li><a
href="450f0c1fe7"><code>450f0c1</code></a>
ci: Exclude Nix 2.3 on aarch64-linux</li>
<li><a
href="900859c11a"><code>900859c</code></a>
Add back Nix 2.3</li>
<li><a
href="73e45e62a2"><code>73e45e6</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/58">#58</a>
from deemp/master</li>
<li>Additional commits viewable in <a
href="https://github.com/nixbuild/nix-quick-install-action/compare/v29...v30">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nixbuild/nix-quick-install-action&package-manager=github_actions&previous-version=29&new-version=30)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-28 14:47:41 +01:00
David Barroso
f93014dbfe fix: apple may return email_verified as a string or boolean (#608) 2025-02-19 09:06:30 +01:00
David Barroso
1495588cd7 chore: update dependencies (#607)
### **PR Type**
Enhancement


___

### **Description**
- Update Go version and toolchain

- Upgrade multiple dependencies to latest versions

- Update PostgreSQL client version in flake.nix

- Add new YAML-related dependencies


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>flake.nix</strong><dd><code>Update PostgreSQL client
version</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

flake.nix

- Update PostgreSQL client from version 16.4 to 17.2


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/607/files#diff-206b9ce276ab5971a2489d75eb1b12999d4bf3843b7988cbe8d687cfde61dea0">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>go.mod</strong><dd><code>Update Go version and
dependencies</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go.mod

<li>Update Go version to 1.23.0<br> <li> Upgrade multiple dependencies
to latest versions<br> <li> Add new dependencies for YAML handling


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/607/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6">+30/-30</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>go.sum</strong><dd><code>Update dependency
checksums</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

go.sum

<li>Update checksums for upgraded dependencies<br> <li> Remove old
dependency versions<br> <li> Add checksums for new dependencies


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/607/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63">+62/-66</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-02-03 16:09:46 +01:00
dependabot[bot]
7d06c4ed2a chore: bump DeterminateSystems/magic-nix-cache-action from 8 to 9 (#605)
Bumps
[DeterminateSystems/magic-nix-cache-action](https://github.com/determinatesystems/magic-nix-cache-action)
from 8 to 9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/determinatesystems/magic-nix-cache-action/releases">DeterminateSystems/magic-nix-cache-action's
releases</a>.</em></p>
<blockquote>
<h2>v9</h2>
<h2>What's Changed</h2>
<ul>
<li>ci workflow: don't check initial substituter list by <a
href="https://github.com/colemickens"><code>@​colemickens</code></a> in
<a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/90">DeterminateSystems/magic-nix-cache-action#90</a></li>
<li>Matrix by <a
href="https://github.com/grahamc"><code>@​grahamc</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/96">DeterminateSystems/magic-nix-cache-action#96</a></li>
<li>Update <code>detsys-ts</code>: Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/69">#69</a>
from DeterminateSystems/update-deps by <a
href="https://github.com/detsys-pr-bot"><code>@​detsys-pr-bot</code></a>
in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/99">DeterminateSystems/magic-nix-cache-action#99</a></li>
<li>Fixup diagnostic URL handling by <a
href="https://github.com/grahamc"><code>@​grahamc</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/100">DeterminateSystems/magic-nix-cache-action#100</a></li>
<li>Diagnostics by <a
href="https://github.com/grahamc"><code>@​grahamc</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/101">DeterminateSystems/magic-nix-cache-action#101</a></li>
<li>Warn on mnc usage by <a
href="https://github.com/grahamc"><code>@​grahamc</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/102">DeterminateSystems/magic-nix-cache-action#102</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/DeterminateSystems/magic-nix-cache-action/compare/v8...v9">https://github.com/DeterminateSystems/magic-nix-cache-action/compare/v8...v9</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6221693898"><code>6221693</code></a>
Warn on mnc usage (<a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/102">#102</a>)</li>
<li><a
href="f7eb5b510a"><code>f7eb5b5</code></a>
Diagnostics (<a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/101">#101</a>)</li>
<li><a
href="fe89a484fe"><code>fe89a48</code></a>
Fixup diagnostic URL handling (<a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/100">#100</a>)</li>
<li><a
href="13dabe8ccc"><code>13dabe8</code></a>
Update <code>detsys-ts</code> for: `Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/69">#69</a>
from DeterminateSystems/updat...</li>
<li><a
href="9ab3ce70d6"><code>9ab3ce7</code></a>
Matrix (<a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/96">#96</a>)</li>
<li><a
href="a76a83091c"><code>a76a830</code></a>
ci workflow: don't check initial substituter list (<a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/90">#90</a>)</li>
<li>See full diff in <a
href="https://github.com/determinatesystems/magic-nix-cache-action/compare/v8...v9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=DeterminateSystems/magic-nix-cache-action&package-manager=github_actions&previous-version=8&new-version=9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-22 10:00:28 +01:00
David Barroso
595b024b54 chore: update deps due to CVE (#604)
### **PR Type**
Enhancement, Other


___

### **Description**
- Update `github.com/MicahParks/jwkset` to v0.7.0

- Upgrade `golang.org/x/time` to v0.9.0

- Address potential security vulnerabilities (CVE)

- Update dependencies in go.mod and go.sum


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>go.mod</strong><dd><code>Update jwkset and time package
versions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go.mod

<li>Upgrade <code>github.com/MicahParks/jwkset</code> from v0.5.19 to
v0.7.0<br> <li> Update <code>golang.org/x/time</code> from v0.5.0 to
v0.9.0


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/604/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>go.sum</strong><dd><code>Update dependency checksums in
go.sum</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

go.sum

<li>Add new versions of <code>github.com/MicahParks/jwkset</code>
(v0.6.0, v0.7.0)<br> <li> Update <code>golang.org/x/time</code> to
v0.9.0<br> <li> Remove old versions and add new checksums


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/604/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63">+6/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2025-01-10 13:37:33 +01:00
David Barroso
82fb906577 feat: webauthn: support discoverable credentials (#601)
### **PR Type**
Enhancement


___

### **Description**
- Implement discoverable credentials for WebAuthn

- Remove userHandle from signin request

- Update WebAuthn login flow

- Add discoverable login support


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>7
files</summary><table>
<tr>
<td><strong>server.gen.go</strong><dd><code>Update generated API server
code</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/601/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+66/-67</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>types.gen.go</strong><dd><code>Remove userHandle from
SignInWebauthnRequest</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/601/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+0/-122</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>post_signin_webauthn.go</strong><dd><code>Implement
discoverable login for WebAuthn</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/601/files#diff-95599fe7466c53c386548cef611f66ac3a5b09f142c34e82b2705716c1fcd689">+20/-13</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>post_signin_webauthn_verify.go</strong><dd><code>Add support
for discoverable credentials verification</code>&nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/601/files#diff-7936c1b9d7038ab183190ece066673628235bdc9883e7f42d3ec8286d8cace7e">+69/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>post_signup_webauthn.go</strong><dd><code>Add discoverable
flag to WebauthnUser</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/601/files#diff-0c2778528d4500955dfedead12e1a96719d7a52834546cc3151ad53662857efa">+5/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>webauthn.go</strong><dd><code>Implement discoverable login
functionality</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/601/files#diff-f4086b19fc5b667766c6580e880ef98b874b4068db0259376cf0cbc179718efc">+66/-12</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>openapi.yaml</strong><dd><code>Remove userHandle from
SignInWebauthnRequest</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/601/files#diff-9fe8f7da727ff26c02939aa060e0348d870e6dd95ba433f9f4d53a9a6967aca0">+0/-12</a>&nbsp;
&nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>3
files</summary><table>
<tr>
<td><strong>post_signin_webauthn_test.go</strong><dd><code>Update tests
for discoverable WebAuthn login</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/601/files#diff-71a06b6b10627842b843348d8879303850ca5badbf947b37fd3df2e667c2bc88">+34/-146</a></td>

</tr>

<tr>
<td><strong>post_signin_webauthn_verify_test.go</strong><dd><code>Add
test for discoverable WebAuthn login</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/601/files#diff-1c449231790f6e56e26d47fecb200b1f2b3585ea9f80ad19ab8f905b01094a46">+145/-2</a>&nbsp;
</td>

</tr>

<tr>
<td><strong>post_signup_webauthn_test.go</strong><dd><code>Update tests
with discoverable flag</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/601/files#diff-d90cf5c246e6e577eeafbd15f2ea2c408e2f986f189e856d4a8f232646973708">+15/-12</a>&nbsp;
</td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
<td><strong>index.html</strong><dd><code>Add WebAuthn signin and signup
demo</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/601/files#diff-0eb547304658805aad788d320f10bf1f292797b5e6d745a3bf617584da017051">+194/-0</a>&nbsp;
</td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2025-01-10 12:42:33 +01:00
dependabot[bot]
26d264e506 chore: bump Codium-ai/pr-agent from 0.25 to 0.26 (#600)
Bumps [Codium-ai/pr-agent](https://github.com/codium-ai/pr-agent) from
0.25 to 0.26.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codium-ai/pr-agent/releases">Codium-ai/pr-agent's
releases</a>.</em></p>
<blockquote>
<h2>v0.26</h2>
<h2><a
href="https://hub.docker.com/repository/docker/codiumai/pr-agent/tags">Docker
tags</a></h2>
<p>codiumai/pr-agent:0.26
codiumai/pr-agent:0.26-github_app
codiumai/pr-agent:0.26-bitbucket-app
codiumai/pr-agent:0.26-gitlab_webhook
codiumai/pr-agent:0.26-github_action
codiumai/pr-agent:0.26-azure_devops_webhook</p>
<h2>What's Changed</h2>
<ul>
<li>Add disable_auto_feedback configuration option to control automatic
feedback by <a href="https://github.com/mrT23"><code>@​mrT23</code></a>
in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1379">Codium-ai/pr-agent#1379</a></li>
<li>Fix doc for Github Actions by <a
href="https://github.com/glebzhidkov"><code>@​glebzhidkov</code></a> in
<a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1390">Codium-ai/pr-agent#1390</a></li>
<li>Introduce to weak model by <a
href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1387">Codium-ai/pr-agent#1387</a></li>
<li>docs: remove model_weak configuration and simplify model selection
by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1392">Codium-ai/pr-agent#1392</a></li>
<li>Similar Code: Add PR Body License Documentation by <a
href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1396">Codium-ai/pr-agent#1396</a></li>
<li>Add support for <code>gemini/gemini-2.0-flash-exp</code> model
by <a href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a>
in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1397">Codium-ai/pr-agent#1397</a></li>
<li>Add --version command and version metadata by <a
href="https://github.com/MarkRx"><code>@​MarkRx</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1384">Codium-ai/pr-agent#1384</a></li>
<li>docs: simplify default tool configurations and update documentation
by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1401">Codium-ai/pr-agent#1401</a></li>
<li>feat: enhance code review output with collapsible code snippets by
<a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1403">Codium-ai/pr-agent#1403</a></li>
<li>fix: only publish empty code suggestions when configured by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1407">Codium-ai/pr-agent#1407</a></li>
<li>Add support for OpenAI <code>o1</code> model and snapshot version
<code>o1-2024-12-17</code>
by <a href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a>
in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1402">Codium-ai/pr-agent#1402</a></li>
<li>Tr/update changelog fix by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1410">Codium-ai/pr-agent#1410</a></li>
<li>feat: add dedent option to code snippet formatting by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1412">Codium-ai/pr-agent#1412</a></li>
<li>Document an example on how to configure PR Agent using environment
variables by <a
href="https://github.com/addianto"><code>@​addianto</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1413">Codium-ai/pr-agent#1413</a></li>
<li>refactor: remove legacy code suggestions feature from review tool by
<a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1416">Codium-ai/pr-agent#1416</a></li>
<li>fix: improve line extraction from files with missing content by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1420">Codium-ai/pr-agent#1420</a></li>
<li>fix: restrict sensitive configuration parameters in CLI arguments by
<a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1425">Codium-ai/pr-agent#1425</a></li>
<li>fix: sanitize Ask tool answers to prevent markdown formatting issues
by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1426">Codium-ai/pr-agent#1426</a></li>
<li>Update Groq models and tokens by <a
href="https://github.com/dceoy"><code>@​dceoy</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1421">Codium-ai/pr-agent#1421</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/glebzhidkov"><code>@​glebzhidkov</code></a>
made their first contribution in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1390">Codium-ai/pr-agent#1390</a></li>
<li><a href="https://github.com/ofir-frd"><code>@​ofir-frd</code></a>
made their first contribution in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1396">Codium-ai/pr-agent#1396</a></li>
<li><a href="https://github.com/addianto"><code>@​addianto</code></a>
made their first contribution in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1413">Codium-ai/pr-agent#1413</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Codium-ai/pr-agent/compare/v0.25...v0.26">https://github.com/Codium-ai/pr-agent/compare/v0.25...v0.26</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8218fa6e13"><code>8218fa6</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1421">#1421</a>
from dceoy/main</li>
<li><a
href="8463c4f549"><code>8463c4f</code></a>
fix: sanitize Ask tool answers to prevent markdown formatting issues
with lea...</li>
<li><a
href="014b1f20c5"><code>014b1f2</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1426">#1426</a>
from Codium-ai/tr/ask_fix</li>
<li><a
href="2f73ab6eab"><code>2f73ab6</code></a>
fix: sanitize Ask tool answers to prevent markdown formatting issues
with lea...</li>
<li><a
href="16dc29a23a"><code>16dc29a</code></a>
fix: sanitize Ask tool answers to prevent markdown formatting
issues</li>
<li><a
href="bd9522057f"><code>bd95220</code></a>
fix: add OpenAI configuration parameters to restricted CLI
arguments</li>
<li><a
href="b3d4af6cbf"><code>b3d4af6</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1425">#1425</a>
from Codium-ai/tr/limit_online_commenting</li>
<li><a
href="5df9698bae"><code>5df9698</code></a>
fix: restrict sensitive configuration parameters in CLI arguments</li>
<li><a
href="e89b65ed38"><code>e89b65e</code></a>
Increase the max token of groq/llama-3.3-70b-versatile</li>
<li><a
href="6a145af159"><code>6a145af</code></a>
fix: make semantic file types extension optional in PR description</li>
<li>Additional commits viewable in <a
href="https://github.com/codium-ai/pr-agent/compare/v0.25...v0.26">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Codium-ai/pr-agent&package-manager=github_actions&previous-version=0.25&new-version=0.26)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-07 14:37:24 +01:00
Sumanth Chinthagunta
457de9a89a fix: make NewSession behave same way like UpdateSession method (#594)
Before submitting this PR:

Noticed session creation behave is different when `UpdateSession` method
is called vs `NewSession` method is called.
keeping the behavior same for both methods, producing similar
`allowedRoles` in session.

### Checklist

- [x] No breaking changes
- [x] Tests pass
- [x] New features have new tests
- [x] Documentation is updated

### Breaking changes

Avoid breaking changes and regressions. If you feel it is unavoidable,
make it explicit in your PR comment so we can review it and see how to
handle it.

### Tests

- please make sure your changes pass the current tests (Use the `make
test` or the `make watch` command).
- if you are introducing a new feature, please write as much tests as
possible.

### Documentation

Please make sure the documentation is updated accordingly, in
particular:

-
[Workflows](https://github.com/nhost/hasura-auth/tree/main/docs/workflows).
Workflows are [Mermaid sequence
diagrams](https://mermaid-js.github.io/mermaid/#/sequenceDiagram)
-
[Schema](https://github.com/nhost/hasura-auth/blob/main/docs/schema.md).
The schema in a [Mermaid ER
diagram](https://mermaid-js.github.io/mermaid/#/entityRelationshipDiagram)
- [Environment
variables](https://github.com/nhost/hasura-auth/blob/main/docs/environment-variables.md).
Please adjust the
[.env.example](https://github.com/nhost/hasura-auth/blob/main/.env.example)
file accordingly
- OpenApi specifications. We are using inline [JSDoc
annotations](https://www.npmjs.com/package/express-jsdoc-swagger)

---------

Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-12-09 20:02:28 +01:00
David Barroso
b566ae9676 chore: update path-to-regexp js deps due to vuln (#596)
### **PR Type**
enhancement, dependencies


___

### **Description**
- Updated the `path-to-regexp` dependency in `package.json` to ensure a
minimum version of 0.12.0.
- Upgraded `path-to-regexp` in `pnpm-lock.yaml` from version 0.1.10 to
8.2.0, ensuring compatibility with Node.js version 16 or higher.
- These changes address potential vulnerabilities by updating to a more
secure version of the `path-to-regexp` package.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>package.json</strong><dd><code>Update dependency
constraints for `path-to-regexp`</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

package.json

<li>Added a new dependency version constraint for
<code>path-to-regexp</code>.<br> <li> Updated the <code>overrides</code>
section to include <code>path-to-regexp</code>.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/596/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519">+2/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>pnpm-lock.yaml</strong><dd><code>Upgrade
`path-to-regexp` and update engine requirements</code>&nbsp; &nbsp;
</dd></summary>
<hr>

pnpm-lock.yaml

<li>Updated <code>path-to-regexp</code> version from 0.1.10 to
8.2.0.<br> <li> Added engine requirement for <code>path-to-regexp</code>
to Node >=16.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/596/files#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bb">+6/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2024-12-09 16:28:43 +01:00
David Barroso
bfb7cab2ca chore: remove unnecessary/unsafe permissions to gen_ai_review (#595)
### **PR Type**
enhancement


___

### **Description**
- Removed the 'contents: write' permission from the GitHub Actions
workflow file to enhance security by limiting permissions to only what
is necessary.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>gen_ai_review.yaml</strong><dd><code>Remove unnecessary
permissions from GitHub workflow</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

.github/workflows/gen_ai_review.yaml

<li>Removed unnecessary 'contents: write' permission from the workflow
<br>file.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/595/files#diff-d1e4c772e0acb5ce4891df2dd94ba58ffaf6393e8f75493ec7e10cbce1c4992c">+0/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2024-12-09 14:14:46 +01:00
dependabot[bot]
9cd0aa0e81 chore: bump Codium-ai/pr-agent from 0.24 to 0.25 (#592)
Bumps [Codium-ai/pr-agent](https://github.com/codium-ai/pr-agent) from
0.24 to 0.25.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codium-ai/pr-agent/releases">Codium-ai/pr-agent's
releases</a>.</em></p>
<blockquote>
<h2>v0.25</h2>
<h2><a
href="https://hub.docker.com/repository/docker/codiumai/pr-agent/tags">Docker
tags</a></h2>
<p>codiumai/pr-agent:0.25
codiumai/pr-agent:0.25-github_app
codiumai/pr-agent:0.25-bitbucket-app
codiumai/pr-agent:0.25-gitlab_webhook
codiumai/pr-agent:0.25-github_action
codiumai/pr-agent:0.25-azure_devops_webhook</p>
<h2>What's Changed</h2>
<ul>
<li>Add 1C Enterprise language by <a
href="https://github.com/proDOOMman"><code>@​proDOOMman</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1197">Codium-ai/pr-agent#1197</a></li>
<li>feat: gitlab skip source, target and labels by <a
href="https://github.com/paolomainardi"><code>@​paolomainardi</code></a>
in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1192">Codium-ai/pr-agent#1192</a></li>
<li>fix: Typo in README (<code>Chrom</code> -&gt; <code>Chrome</code>)
by <a href="https://github.com/ScArLeXiA"><code>@​ScArLeXiA</code></a>
in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1205">Codium-ai/pr-agent#1205</a></li>
<li>Tr/dynamic context by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1224">Codium-ai/pr-agent#1224</a></li>
<li>Add new o1-mini and o1-preview models by <a
href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1226">Codium-ai/pr-agent#1226</a></li>
<li>Set azure devops default status to ByDesign by <a
href="https://github.com/eddielu"><code>@​eddielu</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1228">Codium-ai/pr-agent#1228</a></li>
<li>Update PR Action Handling Logic in GitHub Action Runner by <a
href="https://github.com/matanbaruch"><code>@​matanbaruch</code></a> in
<a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1231">Codium-ai/pr-agent#1231</a></li>
<li>func get_line_link compatible with old gitlab versions by <a
href="https://github.com/yzongyue"><code>@​yzongyue</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1232">Codium-ai/pr-agent#1232</a></li>
<li>Add configuration for auto actions in GitHub Action runner by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1253">Codium-ai/pr-agent#1253</a></li>
<li>Add intro and chat text options for PR code suggestions in
configuration by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1254">Codium-ai/pr-agent#1254</a></li>
<li>feat: add dual publishing mode for PR code suggestions by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1263">Codium-ai/pr-agent#1263</a></li>
<li>feat: enhance PR processing logic across GitLab, GitHub, and
Bitbucket by <a href="https://github.com/mrT23"><code>@​mrT23</code></a>
in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1267">Codium-ai/pr-agent#1267</a></li>
<li>bug-fix_azuredevops-new-file by <a
href="https://github.com/CoryBall"><code>@​CoryBall</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1274">Codium-ai/pr-agent#1274</a></li>
<li>Update footer links and branding from CodiumAI to Qodo by <a
href="https://github.com/almog-lv"><code>@​almog-lv</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1280">Codium-ai/pr-agent#1280</a></li>
<li>support more types of github ticket url / references by <a
href="https://github.com/hussam789"><code>@​hussam789</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1290">Codium-ai/pr-agent#1290</a></li>
<li>disable publishing labels by default by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1299">Codium-ai/pr-agent#1299</a></li>
<li>fix typos in documents by <a
href="https://github.com/dheerajsir"><code>@​dheerajsir</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1305">Codium-ai/pr-agent#1305</a></li>
<li>Add support for new Claude models and update dependencies
by <a href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a>
in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1302">Codium-ai/pr-agent#1302</a></li>
<li>Gitlab docs improved; gitlab webhook secret config standardization
by <a href="https://github.com/s1moe2"><code>@​s1moe2</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1307">Codium-ai/pr-agent#1307</a></li>
<li>Support Google AI Studio by <a
href="https://github.com/yu-iskw"><code>@​yu-iskw</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1313">Codium-ai/pr-agent#1313</a></li>
<li>update bitbucket-pipelines.yml filename in installation by <a
href="https://github.com/nomi3"><code>@​nomi3</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1325">Codium-ai/pr-agent#1325</a></li>
<li>Merge branch 'main' of <a
href="https://github.com/ryanzll/pr-agent">https://github.com/ryanzll/pr-agent</a>
by <a href="https://github.com/ryanzll"><code>@​ryanzll</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1332">Codium-ai/pr-agent#1332</a></li>
<li>Add configuration option to control publish of no code suggestions
message by <a
href="https://github.com/miyagi-do"><code>@​miyagi-do</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1331">Codium-ai/pr-agent#1331</a></li>
<li>Add Claude 3.5 Haiku Model Support and Update Dependencies by <a
href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1345">Codium-ai/pr-agent#1345</a></li>
<li>Remove unused deployment_id variable. by <a
href="https://github.com/NxPKG"><code>@​NxPKG</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1350">Codium-ai/pr-agent#1350</a></li>
<li>Introduce pre-commit hooks and GitHub Actions by <a
href="https://github.com/yu-iskw"><code>@​yu-iskw</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1316">Codium-ai/pr-agent#1316</a></li>
<li>docs: add note about $CI_SERVER_FQDN variable in GitLab CI/CD
pipeline by <a
href="https://github.com/samuele-ruffino96"><code>@​samuele-ruffino96</code></a>
in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1362">Codium-ai/pr-agent#1362</a></li>
<li>committable comments by <a
href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1369">Codium-ai/pr-agent#1369</a></li>
<li>Improve logging and error handling in Azure DevOps provider for code
… by <a href="https://github.com/mrT23"><code>@​mrT23</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1373">Codium-ai/pr-agent#1373</a></li>
<li>Check git_provider and reference_link before using them in utils.py
by <a href="https://github.com/ryanzll"><code>@​ryanzll</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1364">Codium-ai/pr-agent#1364</a></li>
<li>Add Support for GPT-4o November 2024 Model and Update Configurations
by <a href="https://github.com/KennyDizi"><code>@​KennyDizi</code></a>
in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1374">Codium-ai/pr-agent#1374</a></li>
<li>Add publish_output_progress config support to AzureDevOps, BitBucket
and Gitlab providers by <a
href="https://github.com/pdecat"><code>@​pdecat</code></a> in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1376">Codium-ai/pr-agent#1376</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/proDOOMman"><code>@​proDOOMman</code></a> made
their first contribution in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1197">Codium-ai/pr-agent#1197</a></li>
<li><a href="https://github.com/ScArLeXiA"><code>@​ScArLeXiA</code></a>
made their first contribution in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1205">Codium-ai/pr-agent#1205</a></li>
<li><a href="https://github.com/eddielu"><code>@​eddielu</code></a> made
their first contribution in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1228">Codium-ai/pr-agent#1228</a></li>
<li><a
href="https://github.com/matanbaruch"><code>@​matanbaruch</code></a>
made their first contribution in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1231">Codium-ai/pr-agent#1231</a></li>
<li><a href="https://github.com/yzongyue"><code>@​yzongyue</code></a>
made their first contribution in <a
href="https://redirect.github.com/Codium-ai/pr-agent/pull/1232">Codium-ai/pr-agent#1232</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="91bf3c0749"><code>91bf3c0</code></a>
openai version</li>
<li><a
href="159155785e"><code>1591557</code></a>
Update README.md</li>
<li><a
href="eabc296246"><code>eabc296</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1376">#1376</a>
from pdecat/enhancement/generalize_publish_output_pr...</li>
<li><a
href="b44030114e"><code>b440301</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1374">#1374</a>
from KennyDizi/main</li>
<li><a
href="1d6f87be3b"><code>1d6f87b</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1375">#1375</a>
from Codium-ai/update-google-tag-manager</li>
<li><a
href="a7c6fa7bd2"><code>a7c6fa7</code></a>
Merge pull request <a
href="https://redirect.github.com/codium-ai/pr-agent/issues/1364">#1364</a>
from ryanzll/main</li>
<li><a
href="a825aec5f3"><code>a825aec</code></a>
Add publish_output_progress config support to AzureDevOps, BitBucket and
Gitl...</li>
<li><a
href="4df097c228"><code>4df097c</code></a>
Update Google Tag Manager ID in custom analytics integration</li>
<li><a
href="6871e1b27a"><code>6871e1b</code></a>
docs: add section on customizing best practices label in improve.md</li>
<li><a
href="4afe05761d"><code>4afe057</code></a>
docs: add section on best practices for multiple languages in
improve.md</li>
<li>Additional commits viewable in <a
href="https://github.com/codium-ai/pr-agent/compare/v0.24...v0.25">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=Codium-ai/pr-agent&package-manager=github_actions&previous-version=0.24&new-version=0.25)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-03 09:05:37 +01:00
David Barroso
3e2ffd373e fix: signin/idtoken: insert user provider if user provider not found (#590)
### **PR Type**
Bug fix, Tests


___

### **Description**
- Added a new boolean return value in `postSigninIdtokenCheckUserExists`
to indicate if the provider was found.
- Updated `PostSigninIdtoken` to handle the new return value and insert
the user provider if not found.
- Enhanced test cases to mock and verify the insertion of user provider
during sign-in.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>post_signin_idtoken.go</strong><dd><code>Handle missing
user provider during sign-in</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/post_signin_idtoken.go

<li>Added a new boolean return value to indicate if the provider was
<br>found.<br> <li> Updated the
<code>postSigninIdtokenCheckUserExists</code> function to handle the
<br>new return value.<br> <li> Modified the
<code>PostSigninIdtoken</code> function to use the new return value.<br>
<li> Inserted user provider if not found during sign-in.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/590/files#diff-9fd0de4be8562a869563cff72a27f579c9c45d66d9f6d4754a9dd20498514b53">+26/-9</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Tests</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>post_signin_idtoken_test.go</strong><dd><code>Add tests
for inserting user provider during sign-in</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

go/controller/post_signin_idtoken_test.go

<li>Added test cases to mock <code>InsertUserProvider</code>
function.<br> <li> Verified the insertion of user provider when not
found.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/590/files#diff-d849cc9b72340eb39d633b2446f3223cb202e09cabdef07b5ce512f15fc129f2">+20/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2024-11-28 12:03:51 +01:00
David Barroso
f1f4ae2cd3 fix: always set ticket expires at as it can't be null (#588)
Fixes https://github.com/nhost/nhost/issues/3035

### **PR Type**
Bug fix


___

### **Description**
- Updated `TicketExpiresAt` field in multiple test cases to use
`sql.TimestampTz(time.Now())` ensuring it is always set to a non-null
value.
- Modified `ticketExpiresAt` initialization in
`SignupUserWithouthSession` method to ensure it is always set to a
non-null value.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>post_signin_idtoken_test.go</strong><dd><code>Set
non-null `TicketExpiresAt` in test cases</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/post_signin_idtoken_test.go

<li>Updated <code>TicketExpiresAt</code> field to use
<code>sql.TimestampTz(time.Now())</code> <br>instead of
<code>pgtype.Timestamptz{}</code>.<br> <li> Ensured
<code>TicketExpiresAt</code> is always set to a non-null value in test
<br>cases.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/588/files#diff-d849cc9b72340eb39d633b2446f3223cb202e09cabdef07b5ce512f15fc129f2">+4/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>workflows.go</strong><dd><code>Ensure `ticketExpiresAt`
is non-null during user signup</code>&nbsp; &nbsp; </dd></summary>
<hr>

go/controller/workflows.go

<li>Changed <code>ticketExpiresAt</code> initialization to use
<br><code>sql.TimestampTz(time.Now())</code>.<br> <li> Ensured
<code>ticketExpiresAt</code> is always set to a non-null value.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/588/files#diff-6aaacc47584f1edde5a01051611a7baffc583fc32b48df6d7fee39afa16a65cb">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2024-11-26 15:51:34 +01:00
David Barroso
664df61518 feat: migrate signin/webauthn to go and add possibility to login with userHandle (#587)
### **PR Type**
Enhancement, Tests


___

### **Description**
- Added new WebAuthn sign-in and verification endpoints.
- Defined new request and response types for WebAuthn.
- Implemented handlers for WebAuthn sign-in and verification.
- Added tests for new WebAuthn handlers.
- Updated OpenAPI documentation to include new WebAuthn endpoints.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>9
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>server.gen.go</strong><dd><code>Add WebAuthn sign-in
and verification endpoints</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/server.gen.go

<li>Added new endpoints for WebAuthn sign-in and verification.<br> <li>
Implemented middleware for new WebAuthn endpoints.<br> <li> Registered
new WebAuthn routes in the router.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+207/-64</a></td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>types.gen.go</strong><dd><code>Define WebAuthn request
and response types</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/api/types.gen.go

<li>Defined new request and response types for WebAuthn sign-in and
<br>verification.<br> <li> Added JSON handling for new WebAuthn
types.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+228/-0</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>controller.go</strong><dd><code>Extend DBClient
interface with GetSecurityKeys method</code>&nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/controller.go

- Added `GetSecurityKeys` method to `DBClient` interface.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-68eba6c5b3be94c2016a5c821351ad07c60e395226594ff744901f759e22af15">+2/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>post_signin_webauthn.go</strong><dd><code>Implement
PostSigninWebauthn handler</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/post_signin_webauthn.go

<li>Implemented <code>PostSigninWebauthn</code> handler.<br> <li> Added
helper function to convert security keys to WebAuthn
<br>credentials.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-95599fe7466c53c386548cef611f66ac3a5b09f142c34e82b2705716c1fcd689">+89/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>post_signin_webauthn_verify.go</strong><dd><code>Implement
PostSigninWebauthnVerify handler</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

go/controller/post_signin_webauthn_verify.go

- Implemented `PostSigninWebauthnVerify` handler.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-7936c1b9d7038ab183190ece066673628235bdc9883e7f42d3ec8286d8cace7e">+46/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>post_signup_webauthn.go</strong><dd><code>Update
PostSignupWebauthn handler to include credentials</code>&nbsp;
</dd></summary>
<hr>

go/controller/post_signup_webauthn.go

<li>Updated <code>PostSignupWebauthn</code> handler to include
credentials in <br><code>WebauthnUser</code>.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-0c2778528d4500955dfedead12e1a96719d7a52834546cc3151ad53662857efa">+4/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>webauthn.go</strong><dd><code>Implement BeginLogin and
FinishLogin for WebAuthn</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

go/controller/webauthn.go

<li>Implemented <code>BeginLogin</code> and <code>FinishLogin</code>
methods for WebAuthn.<br> <li> Updated <code>WebauthnUser</code> to
include credentials.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-f4086b19fc5b667766c6580e880ef98b874b4068db0259376cf0cbc179718efc">+85/-4</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>workflows.go</strong><dd><code>Add GetUserSecurityKeys
workflow method</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

go/controller/workflows.go

- Added `GetUserSecurityKeys` workflow method.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-6aaacc47584f1edde5a01051611a7baffc583fc32b48df6d7fee39afa16a65cb">+18/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>query.sql.go</strong><dd><code>Add GetSecurityKeys SQL
query and method</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/sql/query.sql.go

- Added `GetSecurityKeys` SQL query and method.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-442fde6e20ac506fb6bc13c00a7374ee9c33b183ffda72db4e49e1b013cd4cde">+34/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Error
handling</strong></td><td><details><summary>1 files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>errors.go</strong><dd><code>Add error handling for
WebAuthn endpoints</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/errors.go

<li>Added new error type <code>ErrSecurityKeyNotFound</code>.<br> <li>
Added error response visitors for new WebAuthn endpoints.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-d2ebd3582b320c6db8161b6f3f90931cee507a68d9667ca1f6c88e8108ede569">+9/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>4
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>controller.go</strong><dd><code>Add mock methods for
GetSecurityKeys</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/mock/controller.go

- Added mock methods for `GetSecurityKeys`.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-f1b1f168b0924b023c571d6274d53defef472a872f5fee4de1c4ae78959cc327">+15/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>post_signin_webauthn_test.go</strong><dd><code>Add
tests for PostSigninWebauthn handler</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/post_signin_webauthn_test.go

- Added tests for `PostSigninWebauthn` handler.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-71a06b6b10627842b843348d8879303850ca5badbf947b37fd3df2e667c2bc88">+387/-0</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>post_signin_webauthn_verify_test.go</strong><dd><code>Add
tests for PostSigninWebauthnVerify handler</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/post_signin_webauthn_verify_test.go

- Added tests for `PostSigninWebauthnVerify` handler.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-1c449231790f6e56e26d47fecb200b1f2b3585ea9f80ad19ab8f905b01094a46">+310/-0</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>post_signup_webauthn_test.go</strong><dd><code>Update
tests for PostSignupWebauthn handler</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/post_signup_webauthn_test.go

<li>Updated tests for <code>PostSignupWebauthn</code> handler to include
credentials.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-d90cf5c246e6e577eeafbd15f2ea2c408e2f986f189e856d4a8f232646973708">+12/-9</a>&nbsp;
&nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>openapi.yaml</strong><dd><code>Add OpenAPI definitions
for WebAuthn endpoints</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/openapi.yaml

<li>Added OpenAPI definitions for WebAuthn sign-in and verification
<br>endpoints.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/587/files#diff-9fe8f7da727ff26c02939aa060e0348d870e6dd95ba433f9f4d53a9a6967aca0">+94/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2024-11-25 15:05:23 +01:00
David Barroso
21de1e1e00 fix: make phoneNumber optional to match database (#586)
### **User description**
Fixes #542


___

### **PR Type**
Bug fix, Tests


___

### **Description**
- Made `phoneNumber` field optional in the `User` struct to match the
database schema.
- Updated the OpenAPI specification to reflect the change in the
`phoneNumber` field.
- Modified tests to accommodate the optional `phoneNumber` field.
- Added a utility function to convert `pgtype.Text` to a pointer string.
- Updated workflows to handle the optional `phoneNumber` field.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>4
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>server.gen.go</strong><dd><code>Update swagger
specification for phoneNumber field</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/server.gen.go

<li>Updated the embedded swagger specification file to reflect changes
in <br>the <code>phoneNumber</code> field.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/586/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+33/-33</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>workflows.go</strong><dd><code>Update workflows for
optional phoneNumber field</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/workflows.go

- Updated workflows to handle optional `phoneNumber` field.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/586/files#diff-6aaacc47584f1edde5a01051611a7baffc583fc32b48df6d7fee39afa16a65cb">+3/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>data.go</strong><dd><code>Add utility function for
pgtype.Text to pointer string conversion</code></dd></summary>
<hr>

go/sql/data.go

- Added utility function to convert `pgtype.Text` to pointer string.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/586/files#diff-ec4afb4c7d26c7385fbe7e0c1ad20494b9bf268e68150e48871a17205c33fb0e">+7/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>openapi.yaml</strong><dd><code>Update OpenAPI spec to
make phoneNumber optional</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/openapi.yaml

<li>Removed <code>phoneNumber</code> from required fields in the OpenAPI
specification.<br> <br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/586/files#diff-9fe8f7da727ff26c02939aa060e0348d870e6dd95ba433f9f4d53a9a6967aca0">+0/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Bug
fix</strong></td><td><details><summary>1 files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>types.gen.go</strong><dd><code>Make phoneNumber field
optional in User struct</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/types.gen.go

<li>Changed <code>phoneNumber</code> field in <code>User</code> struct
to be a pointer and optional.<br> <br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/586/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>7
files</summary><table>
<tr>
  <td>
    <details>

<summary><strong>post_signin_email_password_test.go</strong><dd><code>Update
tests for optional phoneNumber field</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/post_signin_email_password_test.go

- Updated tests to reflect `phoneNumber` field being optional.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/586/files#diff-20169cf1b0f6c102c29b882d28234333096dd5fc226ad1a92119e00206e4c26e">+3/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>post_signin_idtoken_test.go</strong><dd><code>Update
tests for optional phoneNumber field</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/post_signin_idtoken_test.go

- Updated tests to reflect `phoneNumber` field being optional.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/586/files#diff-d849cc9b72340eb39d633b2446f3223cb202e09cabdef07b5ce512f15fc129f2">+4/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>post_signin_otp_email_verify_test.go</strong><dd><code>Update
tests for optional phoneNumber field</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/post_signin_otp_email_verify_test.go

- Updated tests to reflect `phoneNumber` field being optional.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/586/files#diff-df88ef70165a67033c322cc91cd5d0c28d7459f69c709ac9074fb8222e518a7f">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>post_signin_pat_test.go</strong><dd><code>Update tests
for optional phoneNumber field</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/post_signin_pat_test.go

- Updated tests to reflect `phoneNumber` field being optional.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/586/files#diff-020127c3b0d584aa14d94f93ce33be359ce58e7fb9b893211d4edaaceedac9e9">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>post_signup_email_password_test.go</strong><dd><code>Update
tests for optional phoneNumber field</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/post_signup_email_password_test.go

- Updated tests to reflect `phoneNumber` field being optional.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/586/files#diff-c7050138b811ec2f854c0dfa34ac1eb9f03831c1f682e6a677dfe16943cb5f84">+5/-5</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>post_signup_webauthn_verify_test.go</strong><dd><code>Update
tests for optional phoneNumber field</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/post_signup_webauthn_verify_test.go

- Updated tests to reflect `phoneNumber` field being optional.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/586/files#diff-c93cb267e3fcbec34fe2f8c5dbc204bb6d2cbc9fff58597ad761da5a8e661c3c">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>post_token_test.go</strong><dd><code>Update tests for
optional phoneNumber field</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/post_token_test.go

- Updated tests to reflect `phoneNumber` field being optional.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/586/files#diff-dfb4a72aeccf26b3cfb4f1a91a0d2807896febd4b602cfca4b751636befde18a">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2024-11-21 16:47:49 +01:00
David Barroso
ff724cdb04 fix: add missing kid to JWT header (#585)
### **PR Type**
Bug fix


___

### **Description**
- Added a `kid` field to the `JWTGetter` struct to include the Key ID in
the JWT header.
- Initialized the `kid` field in the `NewJWTGetter` function using the
`jwtSecret.KeyID`.
- Modified the `GetToken` method to include the `kid` in the JWT header
if it is not empty.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>jwt.go</strong><dd><code>Add missing `kid` to JWT
header in `JWTGetter`</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/jwt.go

<li>Added <code>kid</code> field to <code>JWTGetter</code> struct.<br>
<li> Initialized <code>kid</code> field in <code>NewJWTGetter</code>
function.<br> <li> Included <code>kid</code> in JWT header if present in
<code>GetToken</code> method.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/585/files#diff-2b63f932811bd25d3716aca99c9a61a691d412f94ab1ce61d85768deb84d3dd9">+5/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2024-11-19 13:37:11 +01:00
David Barroso
d8fbbcf43a fix: update node deps due to vulns (#583)
### **PR Type**
Bug fix, Dependencies


___

### **Description**
- Removed `GHSA-952p-6rrq-rcjv` from the allowlist in `audit-ci.jsonc`.
- Added new dependency overrides in `package.json` for `cookie`,
`elliptic`, and `cross-spawn` to address vulnerabilities.
- Updated `pnpm-lock.yaml` to reflect the new versions of `cookie`,
`elliptic`, and `cross-spawn`, and removed older versions of these and
other dependencies.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>audit-ci.jsonc</strong><dd><code>Remove specific
vulnerability from allowlist</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

audit-ci.jsonc

- Removed `GHSA-952p-6rrq-rcjv` from the allowlist.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/583/files#diff-4ede69da2a1704e53e08b8d647a315c202f037cc9277f16c94176d9622d261c6">+0/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>package.json</strong><dd><code>Add new dependency
overrides for security</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

package.json

<li>Added new dependency overrides for <code>cookie</code>,
<code>elliptic</code>, and <code>cross-spawn</code>.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/583/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519">+4/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>pnpm-lock.yaml</strong><dd><code>Update dependencies to
address vulnerabilities</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

pnpm-lock.yaml

<li>Updated versions for <code>cookie</code>, <code>elliptic</code>, and
<code>cross-spawn</code>.<br> <li> Removed older versions of
<code>cookie</code>, <code>cross-spawn</code>, and other
dependencies.<br> <br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/583/files#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bb">+25/-93</a>&nbsp;
</td>

</tr>
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2024-11-18 16:28:22 +01:00
David Barroso
a199f4ede3 feat: implement OTP over email (#582)
Implements https://github.com/nhost/nhost/issues/2651

example:

```
curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"email": "asd@asd.com"}' \
    http://localhost:4000/signin/otp/email

# get OTP from email

curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"email": "asd@asd.com","otp":"129746"}' \
    http://localhost:4000/signin/otp/email/verify
```

### **PR Type**
Enhancement, Tests


___

### **Description**
- Added new OTP email sign-in and verification endpoints.
- Defined new request and response types for OTP email sign-in and
verification.
- Added configuration and command-line flags for enabling OTP email.
- Implemented controller logic for OTP email sign-in.
- Added tests for OTP email sign-in functionality.
- Updated OpenAPI documentation for new endpoints.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>8
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>server.gen.go</strong><dd><code>Add OTP email sign-in
and verification endpoints</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/server.gen.go

<li>Added new endpoints for OTP email sign-in and verification.<br> <li>
Updated interface and middleware to handle new OTP routes.<br> <li>
Registered new OTP routes in the router.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+206/-64</a></td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>types.gen.go</strong><dd><code>Define OTP email sign-in
and verification types</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/types.gen.go

<li>Defined new request and response types for OTP email sign-in and
<br>verification.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+27/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>get_verify.go</strong><dd><code>Add OTP ticket type
handling</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

go/controller/get_verify.go

- Added OTP ticket type handling in verification logic.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-e64106bbe29a6baf928dd3f91fdfbaf6607ebc51b1a5bf57632718137db9ef9c">+5/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>post_signin_otp_email.go</strong><dd><code>Implement
OTP email sign-in logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/post_signin_otp_email.go

- Implemented controller logic for OTP email sign-in.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-5c2341d0b9cc04c12b83fb8a97a2c9d942dcfbb02e0bd802f035ea73e3efbdcc">+52/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>post_signin_otp_verify.go</strong><dd><code>Add
placeholder for OTP verification logic</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

go/controller/post_signin_otp_verify.go

- Added placeholder for OTP verification logic.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-34b399d52c93703b4829213e118b29a22204847d130bdfb3dff2d9c91f30c415">+14/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>

<summary><strong>post_signin_passwordless_email.go</strong><dd><code>Refactor
passwordless email sign-in logic</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

go/controller/post_signin_passwordless_email.go

<li>Refactored existing passwordless email sign-in logic.<br> <li>
Extracted common email sign-in validation and ticket generation
logic.<br> <br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-b84756f7f1b9ced640c9a925f5e2b2b00a8bd3b6d47ae9d820cc03e42a65e0ae">+67/-40</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>workflows_tickets.go</strong><dd><code>Add OTP ticket
type and generation logic</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

go/controller/workflows_tickets.go

- Added OTP ticket type and OTP generation logic.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-a4d16eaab24ba5b8c7b93fb112b8dd7a7ff7a70308e2d334b1ba6ba38df8b1ee">+17/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>templates.go</strong><dd><code>Add OTP email
notification template</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/notifications/templates.go

- Added template name for OTP email notifications.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-7200e4e0d06dc71060ca7becfdd9ad2e684ca90426c8de883e8d59fa2b1c767f">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>3 files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>config.go</strong><dd><code>Add OTP email configuration
flag</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/cmd/config.go

- Added configuration flag for enabling OTP email.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-6ed50c9d309f6e7cf03742253995dfc65ae67702ae9c4aeb650b24a9b87cf377">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>serve.go</strong><dd><code>Add command-line flag for
OTP email</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/cmd/serve.go

- Added command-line flag for enabling OTP email.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-a900f3187c126bacf5c9c5b1745b5d14bc583c01ab8f1ca84ae449751c224b68">+9/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>config.go</strong><dd><code>Add OTP email enabled field
to config</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

go/controller/config.go

- Added OTP email enabled field to configuration struct.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-77fe34a234b413cd5f46aa02ee1cb93864fc387e765cd7dd1a54efd7ac9a4eb0">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Error
handling</strong></td><td><details><summary>1 files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>errors.go</strong><dd><code>Add error response handlers
for OTP email</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/errors.go

- Added error response handlers for OTP email endpoints.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-d2ebd3582b320c6db8161b6f3f90931cee507a68d9667ca1f6c88e8108ede569">+8/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>3
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>main_test.go</strong><dd><code>Update ticket comparison
logic for OTP</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

go/controller/main_test.go

- Updated ticket comparison logic to handle OTP tickets.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-a13f50ba7fee39bdeff8c7f63e51af45b3e837d359608a042d7e2e8d50fb8b89">+13/-6</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>post_signin_otp_email_test.go</strong><dd><code>Add
tests for OTP email sign-in</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

go/controller/post_signin_otp_email_test.go

- Added tests for OTP email sign-in functionality.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-8b00ba05ca046df6350ea7ebd3e3537b752b009847691497eb5d09c09f265b5c">+596/-0</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>validator_test.go</strong><dd><code>Update
configuration for OTP email tests</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/validator_test.go

- Updated configuration for OTP email tests.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-3f42f5f887ad54ac2f169b2629a4d17be0917e55ca60bfac885300953c8cd5f2">+32/-33</a>&nbsp;
</td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>openapi.yaml</strong><dd><code>Add OpenAPI docs for OTP
email endpoints</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/api/openapi.yaml

<li>Added OpenAPI documentation for OTP email sign-in and verification
<br>endpoints.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/582/files#diff-9fe8f7da727ff26c02939aa060e0348d870e6dd95ba433f9f4d53a9a6967aca0">+85/-3</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information

---------

Co-authored-by: Hassan Ben Jobrane <hsanbenjobrane@gmail.com>
2024-11-18 13:41:32 +01:00
David Barroso
7a092cad77 feat: allow configuring audience for idtoken validation and use fake provider for testing (#581)
### **PR Type**
Enhancement, Tests


___

### **Description**
- Added support for configuring audience for ID token validation.
- Introduced a `FakeProvider` for testing purposes.
- Replaced `AppleClientID` and `GoogleClientID` with `AppleAudience` and
`GoogleAudience` in configurations and tests.
- Refactored OIDC providers to use `GetJWTKeyFunc` instead of
`GetJWKURL`.
- Added helper functions for generating test tokens in tests.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>9
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>api.go</strong><dd><code>Add `FakeProvider` constant
for testing</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

go/api/api.go

- Added a constant `FakeProvider`.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-db7c88224e93eb476cfd418ef861c03f4371d7469911b6496f874b01bbd24921">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>config.go</strong><dd><code>Remove client ID fields
from configuration</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/cmd/config.go

<li>Removed <code>AppleClientID</code> and <code>GoogleClientID</code>
from the configuration.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-6ed50c9d309f6e7cf03742253995dfc65ae67702ae9c4aeb650b24a9b87cf377">+0/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>serve.go</strong><dd><code>Replace client ID with
audience in serve command</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/cmd/serve.go

<li>Replaced <code>AppleClientID</code> and <code>GoogleClientID</code>
with <code>AppleAudience</code> and <br><code>GoogleAudience</code>.<br>
<li> Updated flag names and usages accordingly.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-a900f3187c126bacf5c9c5b1745b5d14bc583c01ab8f1ca84ae449751c224b68">+9/-8</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>config.go</strong><dd><code>Remove client ID fields
from controller config</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/config.go

<li>Removed <code>AppleClientID</code> and <code>GoogleClientID</code>
from the <code>Config</code> struct.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-77fe34a234b413cd5f46aa02ee1cb93864fc387e765cd7dd1a54efd7ac9a4eb0">+0/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>workflows.go</strong><dd><code>Add support for
`FakeProvider` in workflows</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/workflows.go

- Added support for `FakeProvider` in `getIDTokenValidator`.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-6aaacc47584f1edde5a01051611a7baffc583fc32b48df6d7fee39afa16a65cb">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>apple.go</strong><dd><code>Refactor Apple OIDC provider
to use `GetJWTKeyFunc`</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/oidc/apple.go

<li>Refactored to use <code>GetJWTKeyFunc</code> instead of
<code>GetJWKURL</code>.<br> <li> Moved profile extraction logic to a
common function.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-047d8224a5df2d1a55e156bb24c26205deaf254b8f135f0458b2980be774b702">+10/-19</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>fake_provider.go</strong><dd><code>Add `FakeProvider`
for testing OIDC</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/oidc/fake_provider.go

- Added a new `FakeProvider` for testing purposes.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-36c528ff8f6147f9263d34286a683275e4ddd1e7ebdd0f71cb1dc17238aca6d9">+44/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>google.go</strong><dd><code>Refactor Google OIDC
provider to use `GetJWTKeyFunc`</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/oidc/google.go

<li>Refactored to use <code>GetJWTKeyFunc</code> instead of
<code>GetJWKURL</code>.<br> <li> Moved profile extraction logic to a
common function.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-e1d9157b0b0436863d2a99dbb87fba23212cfc1a9192d3616797fc5a6df4f093">+13/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>idtoken.go</strong><dd><code>Add `FakeProvider` support
and refactor ID token validation</code></dd></summary>
<hr>

go/oidc/idtoken.go

<li>Added support for <code>FakeProvider</code> in
<code>IDTokenValidatorProviders</code>.<br> <li> Refactored
<code>IDTokenValidator</code> to use <code>jwtKeyFunc</code> instead of
<br><code>jwkSetKeyFunc</code>.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-90f49038bd9231d2b4ddddc3071dcbc97c373603f56955ead2e8ced0ee7b7259">+27/-13</a>&nbsp;
</td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>4
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>post_link_idtoken_test.go</strong><dd><code>Add test
token helper and use `FakeProvider` in link ID token
tests</code></dd></summary>
<hr>

go/controller/post_link_idtoken_test.go

<li>Added <code>testToken</code> helper function for generating test
tokens.<br> <li> Replaced <code>Google</code> provider with
<code>FakeProvider</code> in tests.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-8de432126fa0e0242bd7183c12a5759f7ba3d06593e38311a6b379485b2c7452">+45/-11</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>post_signin_idtoken_test.go</strong><dd><code>Add test
token helper and use <code>FakeProvider</code> in sign-in ID token
tests</code></dd></summary>
<hr>

go/controller/post_signin_idtoken_test.go

<li>Added <code>testToken</code> helper function for generating test
tokens.<br> <li> Replaced <code>Google</code> provider with
<code>FakeProvider</code> in tests.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-d849cc9b72340eb39d633b2446f3223cb202e09cabdef07b5ce512f15fc129f2">+54/-57</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>validator_test.go</strong><dd><code>Remove client ID
fields from validator tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/validator_test.go

<li>Removed <code>AppleClientID</code> and <code>GoogleClientID</code>
from the configuration.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-3f42f5f887ad54ac2f169b2629a4d17be0917e55ca60bfac885300953c8cd5f2">+0/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>idtoken_test.go</strong><dd><code>Add test token helper
and use `FakeProvider` in ID token tests</code></dd></summary>
<hr>

go/oidc/idtoken_test.go

<li>Added <code>testToken</code> helper function for generating test
tokens.<br> <li> Replaced <code>Google</code> provider with
<code>FakeProvider</code> in tests.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/581/files#diff-329b609f83ff40defe79f2c984595b7b8cee9be2171da1c0ada41d2649c048ad">+41/-49</a>&nbsp;
</td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2024-11-15 12:14:54 +01:00
David Barroso
cc4eff69cd feat: migrate /verify endpoint (#579)
### **PR Type**
Enhancement, Bug fix, Documentation


___

### **Description**
- Added and implemented the `GetVerify` endpoint and its middleware in
the server.
- Defined new constants and parameters for the `GetVerify` endpoint.
- Implemented methods to update user email and verify email in the
controller.
- Enhanced error handling for `GetVerify` responses.
- Added workflows and SQL queries for updating user email and verifying
email.
- Removed `verifyRouter` and related code from the routes.
- Updated dependencies in `go.mod` and `go.sum`.
- Added `/verify` endpoint to the OpenAPI specification.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>11
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>server.gen.go</strong><dd><code>Add and implement
`GetVerify` endpoint and middleware</code>&nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/api/server.gen.go

<li>Added <code>GetVerify</code> endpoint to
<code>ServerInterface</code>.<br> <li> Implemented
<code>GetVerify</code> operation middleware.<br> <li> Registered
<code>GetVerify</code> handler in the router.<br> <li> Added
<code>GetVerify</code> request and response structures.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+175/-57</a></td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>types.gen.go</strong><dd><code>Define constants and
parameters for `GetVerify` endpoint</code>&nbsp; </dd></summary>
<hr>

go/api/types.gen.go

<li>Defined new constants for <code>TicketTypeQuery</code> and
<code>GetVerifyParamsType</code>.<br> <li> Added
<code>GetVerifyParams</code> structure.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+40/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>controller.go</strong><dd><code>Implement user email
update and verification methods</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/controller.go

<li>Added methods to update user email and verify email.<br> <li>
Implemented <code>sendRedirectError</code> method.<br> <li> Added
<code>generateRedirectURL</code> function.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-68eba6c5b3be94c2016a5c821351ad07c60e395226594ff744901f759e22af15">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>errors.go</strong><dd><code>Enhance error handling for
`GetVerify` responses</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/errors.go

<li>Added <code>VisitGetVerifyResponse</code> method to
<code>ErrorResponse</code>.<br> <li> Implemented
<code>sendRedirectError</code> method.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-d2ebd3582b320c6db8161b6f3f90931cee507a68d9667ca1f6c88e8108ede569">+61/-3</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>get_verify.go</strong><dd><code>Implement `GetVerify`
controller function and helpers</code>&nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/get_verify.go

<li>Implemented <code>GetVerify</code> controller function.<br> <li>
Added helper functions for ticket validation and user verification.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-e64106bbe29a6baf928dd3f91fdfbaf6607ebc51b1a5bf57632718137db9ef9c">+139/-0</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>workflows.go</strong><dd><code>Add workflows for user
email update and verification</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go/controller/workflows.go

- Added workflows for updating user email and verifying email.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-6aaacc47584f1edde5a01051611a7baffc583fc32b48df6d7fee39afa16a65cb">+39/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>query.sql.go</strong><dd><code>Add SQL queries for user
email update and verification</code>&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/sql/query.sql.go

- Added SQL queries for updating user email and verifying email.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-442fde6e20ac506fb6bc13c00a7374ee9c33b183ffda72db4e49e1b013cd4cde">+80/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Remove `verifyRouter` from
routes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/routes/index.ts

- Removed `verifyRouter` import and usage.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-4c1a276a826a5147689418cdbf9bde24c8326cedb30a61144fe7867bd99113ef">+0/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Remove `verifyRouter` and
related code</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

src/routes/verify/index.ts

- Deleted `verifyRouter` and related code.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-8876f16f70c910ae16056409f1f39a67ccd0d54a9fdab6925c7b78a166198880">+0/-26</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>verify.ts</strong><dd><code>Remove `verifyHandler` and
related code</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

src/routes/verify/verify.ts

- Deleted `verifyHandler` and related code.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-d6d25e669ff32400028ea0e3ce0855d9aa873ff86439f8e2599b5589de6ef5f8">+0/-103</a>&nbsp;
</td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>query.sql</strong><dd><code>Add SQL queries for user
email update and verification</code>&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/sql/query.sql

- Added SQL queries for updating user email and verifying email.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-c19dd96472c44a7389d4d1f72e0a1879df1e06e8e4d333ca3cb6b6dfbe3083ef">+12/-0</a>&nbsp;
&nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Tests</strong></td><td><details><summary>1
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>controller.go</strong><dd><code>Add mock methods for
user email update and verification</code>&nbsp; &nbsp; </dd></summary>
<hr>

go/controller/mock/controller.go

<li>Added mock methods for <code>UpdateUserConfirmChangeEmail</code> and
<br><code>UpdateUserVerifyEmail</code>.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-f1b1f168b0924b023c571d6274d53defef472a872f5fee4de1c4ae78959cc327">+60/-0</a>&nbsp;
&nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>2
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>go.mod</strong><dd><code>Update dependencies in
go.mod</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go.mod

- Added new indirect dependencies.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>go.sum</strong><dd><code>Update dependencies in
go.sum</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

go.sum

- Added new entries for dependencies.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63">+6/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>openapi.yaml</strong><dd><code>Add `/verify` endpoint
to OpenAPI specification</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/openapi.yaml

<li>Added <code>/verify</code> endpoint definition.<br> <li> Updated
components and parameters for <code>verify</code> endpoint.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/579/files#diff-9fe8f7da727ff26c02939aa060e0348d870e6dd95ba433f9f4d53a9a6967aca0">+69/-3</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2024-11-14 19:16:05 +01:00
David Barroso
c552ad14fd feat: added support for RSA keys (#578)
### **PR Type**
Enhancement, Documentation


___

### **Description**
- Added support for RSA keys in JWT configuration, including handling
for both public and private keys.
- Implemented a new endpoint to retrieve public keys for JWT
verification in JWK Set format.
- Defined new models for `JWK` and `JWKSet`.
- Updated Docker Compose configuration to use RSA keys for JWT.
- Enhanced JWT generation and verification to handle different
algorithms.
- Documented the new JWK Set retrieval endpoint in the OpenAPI
specification.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>7
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>server.gen.go</strong><dd><code>Add JWK Set retrieval
endpoint and middleware</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/server.gen.go

<li>Added <code>GetWellKnownJwksJson</code> handler to
<code>ServerInterface</code>.<br> <li> Implemented middleware for
<code>GetWellKnownJwksJson</code>.<br> <li> Registered new route for JWK
Set retrieval.<br> <li> Defined request and response objects for
<code>GetWellKnownJwksJson</code>.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/578/files#diff-ebca0209f464067ebb38f8fad9dd352058e15702563f575d649434a1e7722b3d">+117/-54</a></td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>types.gen.go</strong><dd><code>Define JWK and JWKSet
models</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

go/api/types.gen.go

- Added `JWK` and `JWKSet` models.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/578/files#diff-086764bd76c1416b0d0ddedcc804c3e6983907886215f9bb51162df91e823254">+15/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>get_well_known_jwks.go</strong><dd><code>Implement JWK
Set retrieval function</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/controller/get_well_known_jwks.go

- Implemented `GetWellKnownJwksJson` function to return JWK Set.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/578/files#diff-1f12ac5ee1ed610d75371c447a27603ef3d519ac8e7e981c15e0c67c29013ece">+15/-0</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>jwt.go</strong><dd><code>Add RSA key support and JWK
Set handling in JWT configuration</code></dd></summary>
<hr>

go/controller/jwt.go

<li>Added support for RSA keys in JWT configuration.<br> <li>
Implemented <code>decodeJWTSecretForRSA</code> function.<br> <li>
Updated <code>decodeJWTSecret</code> to handle different JWT types.<br>
<li> Modified <code>JWTGetter</code> to include JWK Set.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/578/files#diff-2b63f932811bd25d3716aca99c9a61a691d412f94ab1ce61d85768deb84d3dd9">+84/-8</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>types.ts</strong><dd><code>Update JwtSecret type with
optional signing_key</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

src/types.ts

- Added optional `signing_key` field to `JwtSecret` type.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/578/files#diff-c54113cf61ec99691748a3890bfbeb00e10efb3f0a76f03a0fd9ec49072e410a">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>generate.ts</strong><dd><code>Enhance JWT generation
with algorithm-specific secret handling</code></dd></summary>
<hr>

src/utils/jwt/generate.ts

<li>Added <code>getSecret</code> function to handle different JWT
algorithms.<br> <li> Updated <code>sign</code> function to use
<code>getSecret</code>.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/578/files#diff-45151285602729cab0f20b4b997a8a6a6cffdfc65ec51c1fb00578fefb64fbd2">+28/-3</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
  <td>
    <details>
<summary><strong>get-claims.ts</strong><dd><code>Enhance JWT
verification with algorithm-specific secret
handling</code></dd></summary>
<hr>

src/utils/jwt/get-claims.ts

- Updated `verifyJwt` to use `getSecret` for key retrieval.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/578/files#diff-ac9b7f090e07ad27932f65c9229255cafeb78c209d3b9f333f3c2963ef67bd9b">+3/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Error
handling</strong></td><td><details><summary>1 files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>errors.go</strong><dd><code>Add JWT configuration
error</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

go/controller/errors.go

- Added `ErrJWTConfiguration` error.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/578/files#diff-d2ebd3582b320c6db8161b6f3f90931cee507a68d9667ca1f6c88e8108ede569">+2/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>1 files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>docker-compose.yaml</strong><dd><code>Update JWT secret
configuration to RSA in Docker Compose</code>&nbsp; </dd></summary>
<hr>

build/dev/docker/docker-compose.yaml

- Updated JWT secret configuration to use RSA keys.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/578/files#diff-fc60a6b1b5479592a17c3b65cc2ec11b9dad3ad661372656cdc86b983e2a7dcd">+3/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>openapi.yaml</strong><dd><code>Document JWK Set
retrieval endpoint and schemas</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go/api/openapi.yaml

<li>Added JWK and JWKSet schemas.<br> <li> Documented new endpoint for
JWK Set retrieval.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/578/files#diff-9fe8f7da727ff26c02939aa060e0348d870e6dd95ba433f9f4d53a9a6967aca0">+49/-0</a>&nbsp;
&nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information
2024-11-13 15:43:03 +01:00
David Barroso
c8e63c31ee feat: allow linking providers to existing users using an idtoken (#577) 2024-11-13 15:30:46 +01:00
David Barroso
194970bcf4 feat: added /signin/idtoken (#576)
Related to https://github.com/nhost/nhost/issues/2554

This enables the possibility to authenticate using idtokens,
particularly useful for native authentication on IOS/Android devices.
2024-11-11 16:50:02 +01:00
dependabot[bot]
d9e55890cc chore: bump nixbuild/nix-quick-install-action from 28 to 29 (#575)
Bumps
[nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action)
from 28 to 29.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/releases">nixbuild/nix-quick-install-action's
releases</a>.</em></p>
<blockquote>
<h2>nixbuild/nix-quick-install-action@v29</h2>
<h2>Changes</h2>
<ul>
<li>
<p>Bump minor Nix versions: 2.18.2 -&gt; 2.18.8, 2.19.3 -&gt; 2.19.6,
2.20.5 -&gt; 2.20.8,
2.21.0 -&gt; 2.21.4.</p>
</li>
<li>
<p>Add Nix versions: 2.22.3, 2.23.3, 2.24.9</p>
</li>
<li>
<p>Bump default Nix version: 2.21.0 -&gt; 2.24.9</p>
</li>
<li>
<p>Add support for <code>macos-14</code> (ARM64) runners, and remove
support for deprecated
runners. The supported runners are now <code>ubuntu-22.04</code>,
<code>macos-13</code> and
<code>macos-14</code>. Other runners might work, but are not tested by
the
<code>nix-quick-install-action</code> CI.</p>
</li>
</ul>
<h2>Supported Nix Versions on Linux Runners</h2>
<ul>
<li>2.24.9</li>
<li>2.23.3</li>
<li>2.22.3</li>
<li>2.21.4</li>
<li>2.20.8</li>
<li>2.19.6</li>
<li>2.18.8</li>
<li>2.3.18</li>
</ul>
<h2>Supported Nix Versions on MacOS Runners</h2>
<ul>
<li>2.24.9</li>
<li>2.23.3</li>
<li>2.22.3</li>
<li>2.21.4</li>
<li>2.20.8</li>
<li>2.19.6</li>
<li>2.18.8</li>
<li>2.3.18</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE">nixbuild/nix-quick-install-action's
changelog</a>.</em></p>
<blockquote>
<p>v29</p>
<h2>Changes</h2>
<ul>
<li>
<p>Bump minor Nix versions: 2.18.2 -&gt; 2.18.8, 2.19.3 -&gt; 2.19.6,
2.20.5 -&gt; 2.20.8,
2.21.0 -&gt; 2.21.4.</p>
</li>
<li>
<p>Add Nix versions: 2.22.3, 2.23.3, 2.24.9</p>
</li>
<li>
<p>Bump default Nix version: 2.21.0 -&gt; 2.24.9</p>
</li>
<li>
<p>Add support for <code>macos-14</code> (ARM64) runners, and remove
support for deprecated
runners. The supported runners are now <code>ubuntu-22.04</code>,
<code>macos-13</code> and
<code>macos-14</code>. Other runners might work, but are not tested by
the
<code>nix-quick-install-action</code> CI.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="25aff27c25"><code>25aff27</code></a>
Release v29</li>
<li><a
href="e2067cf49b"><code>e2067cf</code></a>
flake: Remove unused system</li>
<li><a
href="4ed3e0f5c8"><code>4ed3e0f</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/51">#51</a>
from nixbuild/update-actions</li>
<li><a
href="1e71a36371"><code>1e71a36</code></a>
ci: Add arch to artifact names</li>
<li><a
href="da4598eac4"><code>da4598e</code></a>
ci: Update actions</li>
<li><a
href="1a459e021e"><code>1a459e0</code></a>
Work around MacOS Arm64 bootstrap problem</li>
<li><a
href="55b85d501e"><code>55b85d5</code></a>
ci: Also build with macos-14 so MacOS Arm64 artifacts are produced</li>
<li><a
href="843aed6c2a"><code>843aed6</code></a>
Fix incorrect env var in install script</li>
<li><a
href="4f426bb427"><code>4f426bb</code></a>
Remove obsolete comment in install script</li>
<li><a
href="eb8469b4e1"><code>eb8469b</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/47">#47</a>
from dbarrosop/master</li>
<li>Additional commits viewable in <a
href="https://github.com/nixbuild/nix-quick-install-action/compare/v28...v29">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nixbuild/nix-quick-install-action&package-manager=github_actions&previous-version=28&new-version=29)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-06 08:55:28 +01:00
github-actions[bot]
eee3d0554c chore: modify update dependencies schedule (#574)
Dependencies updated

Note - If you see this PR and the checks haven't run, close and reopen
the PR. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-11-01 09:34:58 +01:00
David Barroso
bbb97d4a2f fix: make sure AUTH_DISABLE_NEW_USERS is respected when using oauth (#573)
Fixes https://github.com/nhost/nhost/issues/2914
2024-10-11 12:01:22 +02:00
dependabot[bot]
58dc72420d chore: bump cachix/install-nix-action from 29 to 30 (#572)
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from 29 to 30.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v30</h2>
<ul>
<li>Nix: 2.24.7 -&gt; 2.24.9, fixing <a
href="https://github.com/NixOS/nix/security/advisories/GHSA-6fjr-mq49-mm2c">GHSA-6fjr-mq49-mm2c</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="08dcb3a5e6"><code>08dcb3a</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/217">#217</a>
from Enzime/bump</li>
<li><a
href="4204e15198"><code>4204e15</code></a>
nix: 2.24.8 -&gt; 2.24.9</li>
<li><a
href="6a10e2e9fd"><code>6a10e2e</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/216">#216</a>
from Mic92/nix-bump</li>
<li><a
href="2bb614e91a"><code>2bb614e</code></a>
Nix: 2.24.7 -&gt; 2.24.8</li>
<li>See full diff in <a
href="https://github.com/cachix/install-nix-action/compare/v29...v30">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/install-nix-action&package-manager=github_actions&previous-version=29&new-version=30)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-10-04 09:41:38 +02:00
github-actions[bot]
6e160faf7a [Scheduled] Update dependencies (#571)
### **User description**
Dependencies updated

Note - If you see this PR and the checks haven't run, close and reopen
the PR. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs


___

### **PR Type**
Enhancement, Dependencies


___

### **Description**
This PR includes the following updates:
- Updated the Go version from 1.22.0 to 1.23 in `go.mod`.
- Updated the toolchain from go1.22.5 to go1.23.1 in `go.mod`.
- Updated multiple dependencies to their latest versions in `go.mod`.
- Updated checksums for dependencies in `go.sum` to match the new
versions.


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>go.mod</strong><dd><code>Update Go version and
dependencies in go.mod</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

go.mod

<li>Updated Go version from 1.22.0 to 1.23<br> <li> Updated toolchain
from go1.22.5 to go1.23.1<br> <li> Updated multiple dependencies to
their latest versions<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/571/files#diff-33ef32bf6c23acb95f5902d7097b7a1d5128ca061167ec0716715b0b9eeaa5f6">+18/-18</a>&nbsp;
</td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>go.sum</strong><dd><code>Update dependency checksums in
go.sum</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>

go.sum

- Updated checksums for dependencies to match new versions



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/571/files#diff-3295df7234525439d778f1b282d146a4f1ff6b415248aaac074e8042d9f42d63">+36/-36</a>&nbsp;
</td>

</tr>                    
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**: Comment `/help "your question"` on any pull
request to receive relevant information

Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2024-10-01 09:05:00 +02:00
dependabot[bot]
4e4adee643 chore: bump cachix/install-nix-action from V28 to 29 (#570)
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from V28 to 29. This release includes the previously tagged commit.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v29</h2>
<p>Bumps Nix to 2.24.8 to fix CVE-2024-47174</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9f70348d77"><code>9f70348</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/215">#215</a>
from Mic92/nix-bump</li>
<li><a
href="4f91dc2b65"><code>4f91dc2</code></a>
Nix: 2.24.6 -&gt; 2.24.7</li>
<li>See full diff in <a
href="https://github.com/cachix/install-nix-action/compare/V28...v29">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-27 12:08:12 +02:00
David Barroso
2813bd6299 feat: added support for turnstile verification on signup (#568) 2024-09-27 11:39:24 +02:00
David Barroso
9cbe270238 chore: update nixops (#569) 2024-09-25 13:27:39 +02:00
Murugappan Chetty
91bb815043 fix: change hasura health check url to make auth server work in gcp (#565)
Google cloud doesnt support "z" urls -
https://stackoverflow.com/questions/43380939/where-does-the-convention-of-using-healthz-for-application-health-checks-come-f

And hasura provides an alternate end point for this
https://hasura.io/docs/2.0/api-reference/health/ .

### Checklist

- [ ] No breaking changes
- [X] Tests pass
- [X] New features have new tests
- [ ] Documentation is updated
2024-09-25 07:35:31 +02:00
dependabot[bot]
d37fbb0056 chore: bump cachix/install-nix-action from 27 to 28 (#562)
Bumps
[cachix/install-nix-action](https://github.com/cachix/install-nix-action)
from 27 to 28.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/cachix/install-nix-action/releases">cachix/install-nix-action's
releases</a>.</em></p>
<blockquote>
<h2>v28</h2>
<p>Nix 2.24.6 - <a
href="https://github.com/NixOS/nix/security/advisories/GHSA-h4vv-h3jq-v493">https://github.com/NixOS/nix/security/advisories/GHSA-h4vv-h3jq-v493</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="3715ab1a11"><code>3715ab1</code></a>
bump channel</li>
<li><a
href="1872f1ff9d"><code>1872f1f</code></a>
Nix: 2.22.1 -&gt; 2.24.6</li>
<li><a
href="e268b7aa05"><code>e268b7a</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/213">#213</a>
from phaer/patch-1</li>
<li><a
href="5b8c65d4d7"><code>5b8c65d</code></a>
Update README: hardware accel is available now...</li>
<li><a
href="ba01fffc51"><code>ba01fff</code></a>
Merge pull request <a
href="https://redirect.github.com/cachix/install-nix-action/issues/210">#210</a>
from guoard/patch-1</li>
<li><a
href="474f0a77aa"><code>474f0a7</code></a>
docs(readme): update checkout action version</li>
<li><a
href="725982224c"><code>7259822</code></a>
readme: V27</li>
<li>See full diff in <a
href="https://github.com/cachix/install-nix-action/compare/v27...V28">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=cachix/install-nix-action&package-manager=github_actions&previous-version=27&new-version=28)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-09-13 11:17:32 +02:00
dependabot[bot]
ed7fc85791 chore: bump DeterminateSystems/magic-nix-cache-action from 7 to 8 (#561)
Bumps
[DeterminateSystems/magic-nix-cache-action](https://github.com/determinatesystems/magic-nix-cache-action)
from 7 to 8.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/determinatesystems/magic-nix-cache-action/releases">DeterminateSystems/magic-nix-cache-action's
releases</a>.</em></p>
<blockquote>
<h2>v8</h2>
<h2>What's Changed</h2>
<ul>
<li>RUST_LOG default to tracing our stuff, only debug for everything
else by <a
href="https://github.com/colemickens"><code>@​colemickens</code></a> in
<a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/63">DeterminateSystems/magic-nix-cache-action#63</a></li>
<li>Remove package-lock.json by <a
href="https://github.com/lucperkins"><code>@​lucperkins</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/64">DeterminateSystems/magic-nix-cache-action#64</a></li>
<li>Prevent the Action from failing with strict mode disabled by <a
href="https://github.com/lucperkins"><code>@​lucperkins</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/62">DeterminateSystems/magic-nix-cache-action#62</a></li>
<li>Fix nullish coalescing by <a
href="https://github.com/lucperkins"><code>@​lucperkins</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/65">DeterminateSystems/magic-nix-cache-action#65</a></li>
<li>Update detsys-ts by <a
href="https://github.com/lucperkins"><code>@​lucperkins</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/66">DeterminateSystems/magic-nix-cache-action#66</a></li>
<li>Provide info output for potential missing permissions block by <a
href="https://github.com/lucperkins"><code>@​lucperkins</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/73">DeterminateSystems/magic-nix-cache-action#73</a></li>
<li>Bump fast-xml-parser from 4.4.0 to 4.4.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/75">DeterminateSystems/magic-nix-cache-action#75</a></li>
<li>Update fast-xml-parser by <a
href="https://github.com/lucperkins"><code>@​lucperkins</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/78">DeterminateSystems/magic-nix-cache-action#78</a></li>
<li>Don't run the &quot;trusted&quot; checks if we're in a PR by <a
href="https://github.com/grahamc"><code>@​grahamc</code></a> in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/85">DeterminateSystems/magic-nix-cache-action#85</a></li>
<li>Update <code>detsys-ts</code>: Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/63">#63</a>
from DeterminateSystems/retry-streams by <a
href="https://github.com/detsys-pr-bot"><code>@​detsys-pr-bot</code></a>
in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/84">DeterminateSystems/magic-nix-cache-action#84</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/colemickens"><code>@​colemickens</code></a>
made their first contribution in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/63">DeterminateSystems/magic-nix-cache-action#63</a></li>
<li><a
href="https://github.com/dependabot"><code>@​dependabot</code></a> made
their first contribution in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/75">DeterminateSystems/magic-nix-cache-action#75</a></li>
<li><a
href="https://github.com/detsys-pr-bot"><code>@​detsys-pr-bot</code></a>
made their first contribution in <a
href="https://redirect.github.com/DeterminateSystems/magic-nix-cache-action/pull/84">DeterminateSystems/magic-nix-cache-action#84</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/DeterminateSystems/magic-nix-cache-action/compare/v7...v8">https://github.com/DeterminateSystems/magic-nix-cache-action/compare/v7...v8</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="87b14cf437"><code>87b14cf</code></a>
Update <code>detsys-ts</code> for: `Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/63">#63</a>
from DeterminateSystems/retry...</li>
<li><a
href="538f0296e2"><code>538f029</code></a>
Don't run the &quot;trusted&quot; checks if we're in a PR (<a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/85">#85</a>)</li>
<li><a
href="9d627e84ff"><code>9d627e8</code></a>
Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/78">#78</a>
from DeterminateSystems/update-fast-xml-parser</li>
<li><a
href="9d32f14410"><code>9d32f14</code></a>
Update fast-xml-parser</li>
<li><a
href="6181dd9ee2"><code>6181dd9</code></a>
Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/75">#75</a>
from DeterminateSystems/dependabot/npm_and_yarn/fast-x...</li>
<li><a
href="768ebc3208"><code>768ebc3</code></a>
Update built package</li>
<li><a
href="1929664175"><code>1929664</code></a>
Bump fast-xml-parser from 4.4.0 to 4.4.1</li>
<li><a
href="56ad6029ca"><code>56ad602</code></a>
Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/73">#73</a>
from DeterminateSystems/clarify-log-message</li>
<li><a
href="45d13621c5"><code>45d1362</code></a>
Provide info output for potential missing permissions block</li>
<li><a
href="7f56db3553"><code>7f56db3</code></a>
Merge pull request <a
href="https://redirect.github.com/determinatesystems/magic-nix-cache-action/issues/66">#66</a>
from DeterminateSystems/update-detsys-ts</li>
<li>Additional commits viewable in <a
href="https://github.com/determinatesystems/magic-nix-cache-action/compare/v7...v8">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=DeterminateSystems/magic-nix-cache-action&package-manager=github_actions&previous-version=7&new-version=8)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-09-10 09:30:20 +02:00
dependabot[bot]
da87fba3d0 chore: bump peter-evans/create-pull-request from 6 to 7 (#560)
Bumps
[peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request)
from 6 to 7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/peter-evans/create-pull-request/releases">peter-evans/create-pull-request's
releases</a>.</em></p>
<blockquote>
<h2>Create Pull Request v7.0.0</h2>
<p> Now supports commit signing with bot-generated tokens! See
&quot;What's new&quot; below. ✍️🤖</p>
<h3>Behaviour changes</h3>
<ul>
<li>Action input <code>git-token</code> has been renamed
<code>branch-token</code>, to be more clear about its purpose. The
<code>branch-token</code> is the token that the action will use to
create and update the branch.</li>
<li>The action now handles requests that have been rate-limited by
GitHub. Requests hitting a primary rate limit will retry twice, for a
total of three attempts. Requests hitting a secondary rate limit will
not be retried.</li>
<li>The <code>pull-request-operation</code> output now returns
<code>none</code> when no operation was executed.</li>
<li>Removed deprecated output environment variable
<code>PULL_REQUEST_NUMBER</code>. Please use the
<code>pull-request-number</code> action output instead.</li>
</ul>
<h3>What's new</h3>
<ul>
<li>The action can now sign commits as <code>github-actions[bot]</code>
when using <code>GITHUB_TOKEN</code>, or your own bot when using <a
href="https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens">GitHub
App tokens</a>. See <a
href="https://github.com/peter-evans/create-pull-request/blob/HEAD/docs/concepts-guidelines.md#commit-signature-verification-for-bots">commit
signing</a> for details.</li>
<li>Action input <code>draft</code> now accepts a new value
<code>always-true</code>. This will set the pull request to draft status
when the pull request is updated, as well as on creation.</li>
<li>A new action input <code>maintainer-can-modify</code> indicates
whether <a
href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork">maintainers
can modify</a> the pull request. The default is <code>true</code>, which
retains the existing behaviour of the action.</li>
<li>A new output <code>pull-request-commits-verified</code> returns
<code>true</code> or <code>false</code>, indicating whether GitHub
considers the signature of the branch's commits to be verified.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.36 to
18.19.39 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3000">peter-evans/create-pull-request#3000</a></li>
<li>build(deps-dev): bump ts-jest from 29.1.5 to 29.2.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3008">peter-evans/create-pull-request#3008</a></li>
<li>build(deps-dev): bump prettier from 3.3.2 to 3.3.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3018">peter-evans/create-pull-request#3018</a></li>
<li>build(deps-dev): bump ts-jest from 29.2.0 to 29.2.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3019">peter-evans/create-pull-request#3019</a></li>
<li>build(deps-dev): bump eslint-plugin-prettier from 5.1.3 to 5.2.1 by
<a href="https://github.com/dependabot"><code>@​dependabot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3035">peter-evans/create-pull-request#3035</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.39 to
18.19.41 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3037">peter-evans/create-pull-request#3037</a></li>
<li>build(deps): bump undici from 6.19.2 to 6.19.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3036">peter-evans/create-pull-request#3036</a></li>
<li>build(deps-dev): bump ts-jest from 29.2.2 to 29.2.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3038">peter-evans/create-pull-request#3038</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.41 to
18.19.42 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3070">peter-evans/create-pull-request#3070</a></li>
<li>build(deps): bump undici from 6.19.4 to 6.19.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3086">peter-evans/create-pull-request#3086</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.42 to
18.19.43 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3087">peter-evans/create-pull-request#3087</a></li>
<li>build(deps-dev): bump ts-jest from 29.2.3 to 29.2.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3088">peter-evans/create-pull-request#3088</a></li>
<li>build(deps): bump undici from 6.19.5 to 6.19.7 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3145">peter-evans/create-pull-request#3145</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.43 to
18.19.44 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3144">peter-evans/create-pull-request#3144</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3154">peter-evans/create-pull-request#3154</a></li>
<li>build(deps): bump undici from 6.19.7 to 6.19.8 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3213">peter-evans/create-pull-request#3213</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.44 to
18.19.45 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3214">peter-evans/create-pull-request#3214</a></li>
<li>Update distribution by <a
href="https://github.com/actions-bot"><code>@​actions-bot</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3221">peter-evans/create-pull-request#3221</a></li>
<li>build(deps-dev): bump eslint-import-resolver-typescript from 3.6.1
to 3.6.3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3255">peter-evans/create-pull-request#3255</a></li>
<li>build(deps-dev): bump <code>@​types/node</code> from 18.19.45 to
18.19.46 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3254">peter-evans/create-pull-request#3254</a></li>
<li>build(deps-dev): bump ts-jest from 29.2.4 to 29.2.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3256">peter-evans/create-pull-request#3256</a></li>
<li>v7 - signed commits by <a
href="https://github.com/peter-evans"><code>@​peter-evans</code></a> in
<a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3057">peter-evans/create-pull-request#3057</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/rustycl0ck"><code>@​rustycl0ck</code></a> made
their first contribution in <a
href="https://redirect.github.com/peter-evans/create-pull-request/pull/3057">peter-evans/create-pull-request#3057</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/peter-evans/create-pull-request/compare/v6.1.0...v7.0.0">https://github.com/peter-evans/create-pull-request/compare/v6.1.0...v7.0.0</a></p>
<h2>Create Pull Request v6.1.0</h2>
<p> Adds <code>pull-request-branch</code> as an action output.</p>
<h2>What's Changed</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4320041ed3"><code>4320041</code></a>
feat: signed commits (v7) (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3057">#3057</a>)</li>
<li><a
href="0c2a66fe4a"><code>0c2a66f</code></a>
build(deps-dev): bump ts-jest from 29.2.4 to 29.2.5 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3256">#3256</a>)</li>
<li><a
href="17121bc5b5"><code>17121bc</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.45 to
18.19.46 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3254">#3254</a>)</li>
<li><a
href="87b5d6d564"><code>87b5d6d</code></a>
build(deps-dev): bump eslint-import-resolver-typescript (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3255">#3255</a>)</li>
<li><a
href="00897e0bc2"><code>00897e0</code></a>
build: update distribution (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3221">#3221</a>)</li>
<li><a
href="4cfc1fc717"><code>4cfc1fc</code></a>
build(deps-dev): bump <code>@​types/node</code> from 18.19.44 to
18.19.45 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3214">#3214</a>)</li>
<li><a
href="cb4ed6491a"><code>cb4ed64</code></a>
build(deps): bump undici from 6.19.7 to 6.19.8 (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3213">#3213</a>)</li>
<li><a
href="4eb90b7bc7"><code>4eb90b7</code></a>
ci: separate test suite commands in pr comment</li>
<li><a
href="5308ecb864"><code>5308ecb</code></a>
ci: add sign-commits flag to test suite comment</li>
<li><a
href="ba864ad40c"><code>ba864ad</code></a>
build: update distribution (<a
href="https://redirect.github.com/peter-evans/create-pull-request/issues/3154">#3154</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/peter-evans/create-pull-request/compare/v6...v7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=peter-evans/create-pull-request&package-manager=github_actions&previous-version=6&new-version=7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-04 08:24:54 +02:00
github-actions[bot]
45c3a792e7 [Scheduled] Update dependencies (#557)
Dependencies updated

Note - If you see this PR and the checks haven't run, close and reopen
the PR. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

---------

Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-09-01 09:59:18 +02:00
David Barroso
b7b6a34753 fix: minor improvements to sliding window (#556) 2024-08-31 17:06:11 +02:00
David Barroso
f02b109c00 feat: migrate /user/password to go (#555)
Fixes https://github.com/nhost/nhost/issues/2847
2024-08-30 13:46:03 +02:00
David Barroso
05ba244030 chore: ci: hotfix for releases 2024-08-29 17:05:39 +02:00
Tchoupinax
1e6c29f606 fix: correctly display error message when metadata migration fails (#551) 2024-08-29 14:33:20 +02:00
David Barroso
bdccfffc16 chore: ci: a few more improvements (#554) 2024-08-29 14:04:33 +02:00
David Barroso
b2df24adb6 ci: improvements (#553) 2024-08-29 10:32:34 +02:00
David Barroso
4f749fad08 chore: simplify CI and remove need for secrets 2024-08-29 09:37:01 +02:00
David Barroso
36837b13d1 feat: implement rate-limiter (#543) 2024-08-26 19:28:04 +02:00
Hassan Ben Jobrane
66bab982fb feat: improve email templates (#548)
### **PR Type**
enhancement, documentation


___

### **Description**
- Introduced new email templates for various actions such as email
verification, password reset, and passwordless sign-in using
`@react-email/components`.
- Implemented a script to automate the generation of email templates for
different locales.
- Updated the test suite to enhance email template rendering and added
logging for debugging.
- Added documentation with instructions on generating emails for new
locales.
- Updated package scripts and dependencies to support email template
generation and development.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>6
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>templates_test.go</strong><dd><code>Enhance email
template rendering in tests</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>

go/notifications/templates_test.go

<li>Updated email template rendering in tests.<br> <li> Added logging
for rendered email body.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/548/files#diff-056a4946b92734130bb1a485eac9a137852153d45ea9298068637b6920cc24df">+51/-3</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>email-confirm-change.tsx</strong><dd><code>Add email
template for confirming email change</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

email-templates/generator/email-confirm-change.tsx

<li>Added new email template for confirming email change.<br> <li>
Utilized <code>@react-email/components</code> for structure.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/548/files#diff-b950e0673e8b102efa9a30f6b438656dde6cf43ce05e1c03cc62a6cc2696c4f1">+129/-0</a>&nbsp;
</td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>email-verify.tsx</strong><dd><code>Add email template
for email verification</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

email-templates/generator/email-verify.tsx

<li>Added new email template for email verification.<br> <li> Utilized
<code>@react-email/components</code> for structure.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/548/files#diff-0b90eaf1f2fa63108b5338f9985dd86db0e045adbad3fc87c407eb289a01d05d">+127/-0</a>&nbsp;
</td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>password-reset.tsx</strong><dd><code>Add email template
for password reset</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

email-templates/generator/password-reset.tsx

<li>Added new email template for password reset.<br> <li> Utilized
<code>@react-email/components</code> for structure.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/548/files#diff-8b70edaddf23793449e62103ebff6e73f2cafc32f9afefde28d2205d9f98fc97">+127/-0</a>&nbsp;
</td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>render-emails.ts</strong><dd><code>Implement email
rendering script for locales</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

email-templates/generator/render-emails.ts

<li>Implemented script to render email templates for different
locales.<br> <li> Integrated prettier for formatting HTML output.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/548/files#diff-ba11da88a3c8688af88b0b0e6a6ea5a123873f830b4ab72080b37666e18ac1f3">+73/-0</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>signin-passwordless.tsx</strong><dd><code>Add email
template for passwordless sign-in</code>&nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

email-templates/generator/signin-passwordless.tsx

<li>Added new email template for passwordless sign-in.<br> <li> Utilized
<code>@react-email/components</code> for structure.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/548/files#diff-aca020dbe4b94c3b2e6a69b8576123a5944eb90bd3a622413bc9d45c7bc8ed4f">+127/-0</a>&nbsp;
</td>

</tr>                    

</table></details></td></tr><tr><td><strong>Documentation</strong></td><td><details><summary>1
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>README.md</strong><dd><code>Add README for email
generation instructions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

email-templates/generator/README.md

<li>Added instructions for generating emails for new locales.<br> <li>
Provided example command for generating German locale emails.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/548/files#diff-a28195d810c847e5307d897b899ae949c086c91734f9acd02c85801c6305d817">+23/-0</a>&nbsp;
&nbsp; </td>

</tr>                    

</table></details></td></tr><tr><td><strong>Dependencies</strong></td><td><details><summary>2
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>package.json</strong><dd><code>Update package scripts
and dependencies for email generation</code></dd></summary>
<hr>

package.json

<li>Added new scripts for email development and generation.<br> <li>
Updated dependencies to include
<code>@react-email/components</code>.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/548/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519">+4/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>pnpm-lock.yaml</strong><dd><code>Update lock file for
new email dependencies</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

pnpm-lock.yaml

<li>Updated lock file with new dependencies.<br> <li> Included
<code>@react-email/components</code> and related packages.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/548/files#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bb">+694/-55</a></td>

</tr>                    
</table></details></td></tr><tr><td><strong>Configuration
changes</strong></td><td><details><summary>1 files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>tsconfig.json</strong><dd><code>Configure TypeScript
for React JSX</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

tsconfig.json

- Added JSX configuration for React.



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/548/files#diff-b55cdbef4907b7045f32cc5360d48d262cca5f94062e353089f189f4460039e0">+1/-0</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>                    
</table></details></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**:
>Comment `/help` on the PR to get a list of all available PR-Agent tools
and their descriptions
2024-08-20 15:26:50 +01:00
Hassan Ben Jobrane
74803d46ef chore: override versions for axios and ws to fix vulnerabilities (#549)
### **PR Type**
enhancement, dependencies


___

### **Description**
- Updated the `axios` package version constraints to `>=1.7.4` to
address security vulnerabilities.
- Modified the `ws` package version constraints to include specific
versions to fix vulnerabilities.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Dependencies</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>package.json</strong><dd><code>Override versions for
axios and ws to address vulnerabilities</code></dd></summary>
<hr>

package.json

<li>Updated the version constraints for <code>axios</code> to
<code>>=1.7.4</code>.<br> <li> Updated the version constraints for
<code>ws</code> to multiple specific versions.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/549/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519">+5/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>                    
</table></td></tr><tr><td><strong>Additional files
(token-limit)</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>pnpm-lock.yaml</strong><dd><code>...</code>&nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>

pnpm-lock.yaml

...



</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/549/files#diff-32824c984905bb02bc7ffcef96a77addd1f1602cff71a11fbbfdd7f53ee026bb">+8010/-9737</a></td>

</tr>                    
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**:
>Comment `/help` on the PR to get a list of all available PR-Agent tools
and their descriptions
2024-08-16 13:52:42 +01:00
Francesco Manzali
189ea758be fix: Forward OAuth error to the client (#541)
### **User description**
Previously, if the OAuth sign-in failed due to signup being disabled,
the error was not being forwarded back to the client, contrary to what
happens for all other errors. This PR fixes that.

## How to reproduce
1. Set `AUTH_DISABLE_SIGNUP=true` 
2. Attempt to sign-in via OAuth with a user that does not exist in the
database, specifying a `redirectTo` URL.

## Expected
The user should be redirected to `redirectTo`, with the `error` as
search param.

## What happens
No redirect happens, and the end user will see the error
`{"status":403,"message":"Sign up is
disabled.","error":"signup-disabled"}`

## The issue
In `/oauth/index.ts`, `sendError()` is called without the `redirectTo`
and `forwardRedirection` arguments, so the `signup-disabled` error is
not forwarded to the app.

## The fix
Specify the `redirectTo` and `forwardRedirection` when calling
`sendError()` (as it is done for all other errors).


___

### **PR Type**
Bug fix


___

### **Description**
- Fixed an issue where the OAuth `signup-disabled` error was not being
forwarded to the client with the appropriate redirection parameters.
- Added `redirectTo` and `forwardRedirection` arguments to the
`sendError` function call for the `signup-disabled` error in
`src/routes/oauth/index.ts`.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Bug
fix</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Forward OAuth
signup-disabled error with redirection parameters</code></dd></summary>
<hr>

src/routes/oauth/index.ts

<li>Added <code>redirectTo</code> and <code>forwardRedirection</code>
parameters to the <code>sendError</code> <br>function call for the
<code>signup-disabled</code> error.<br>


</details>


  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/541/files#diff-377b11b1cf0052db32d2d519ffb6ac36c496acf967f7c99c8a18acb45fc13b28">+1/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>                    
</table></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**:
>Comment `/help` on the PR to get a list of all available PR-Agent tools
and their descriptions

Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-08-07 09:55:39 +02:00
David Barroso
4993f9e548 fix: restrict display name to avoid urls, spam, html tags, etc. (#545) 2024-08-07 09:13:25 +02:00
David Barroso
c98a3beaad fix: set password limit to 50 to avoid reaching bcrypt limit of 72 bytes (#544) 2024-08-06 16:44:36 +02:00
github-actions[bot]
20ccc6cde0 [Scheduled] Update dependencies (#538)
Dependencies updated

Note - If you see this PR and the checks haven't run, close and reopen
the PR. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

---------

Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-08-03 20:30:02 +02:00
David Barroso
4dd8c52cb7 chore: ci: increase timeout 2024-08-03 15:42:03 +02:00
David Barroso
63130b84f5 chore: increase github actions timeout (#546) 2024-07-31 18:02:22 +02:00
David Barroso
8e8275240c chore: nodejs: remove migrated endpoints (#537)
### **PR Type**
Enhancement, Other


___

### **Description**
- Removed OpenAPI route setup and related schema definitions.
- Removed various routes and handlers including Personal Access Token
(PAT), email-password sign-in, passwordless email sign-in, and sign-up
routes.
- Cleaned up middleware and route usage in the main application file.



___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>22
files</summary><table>
<tr>
  <td>
    <details>
<summary><strong>app.ts</strong><dd><code>Remove OpenAPI route and clean
up middleware usage</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></summary>
<hr>
      
src/app.ts

<li>Removed the import and usage of <code>addOpenApiRoute</code>.<br>
<li> Cleaned up middleware and route usage.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-841254fe75488c1bd4cd7f68f00b4be0e48dcfbc4a16b45847b68295e0e3b27b">+0/-3</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Remove OpenAPI route setup
and schema definitions</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>
      
src/openapi/index.ts

<li>Deleted the entire file which contained OpenAPI route setup and
schema <br>definitions.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-5cad5114d4c277a6989e57f1e8a1fd2e0c38d965cf2c9703a021d748e0f609ec">+0/-119</a>&nbsp;
</td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>responses.ts</strong><dd><code>Remove OpenAPI response
models</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>
      
src/openapi/responses.ts

<li>Deleted the entire file which contained response models for OpenAPI
<br>schemas.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-d184ef3f0524c1cc5244179f78722a43b2c1cb4d36911c49f03f868bba15b5ed">+0/-66</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Remove PAT and sign-up
routes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>
      
src/routes/index.ts

- Removed imports and usage of `patRouter` and `signUpRouter`.



</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-4c1a276a826a5147689418cdbf9bde24c8326cedb30a61144fe7867bd99113ef">+0/-4</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Remove Personal Access Token
(PAT) route</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>
      
src/routes/pat/index.ts

<li>Deleted the entire file which contained the Personal Access Token
<br>(PAT) route.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-0cab04d0c3bdd1b5644679487264bae0931d9a2113af26dc7236bf3977da7137">+0/-26</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>pat.ts</strong><dd><code>Remove PAT handler and
schema</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>
      
src/routes/pat/pat.ts

<li>Deleted the entire file which contained the handler and schema for
<br>creating PATs.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-9b5f0736fc33aeaf1c1f2f9c91e4356fb9477b5796822ae2521ea1d688dd0e3a">+0/-66</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>email-password.ts</strong><dd><code>Remove
email-password sign-in handler and schema</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>
      
src/routes/signin/email-password.ts

<li>Deleted the entire file which contained the email-password sign-in
<br>handler and schema.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-9417570363ed2b7f56a564c7f865bc4a32f278ec0e92f6b15a14deb2407f8fc4">+0/-55</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Remove email-password, PAT,
and passwordless email sign-in routes</code></dd></summary>
<hr>
      
src/routes/signin/index.ts

<li>Removed imports and usage of email-password, PAT, and passwordless
<br>email sign-in handlers and schemas.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-26afd2e4ccfcac5d8a5fdbd1312ac77bfa6d2269f06b7180b4ca75c8d523d642">+0/-53</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>email.ts</strong><dd><code>Remove passwordless email
sign-in handler and schema</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>
      
src/routes/signin/passwordless/email.ts

<li>Deleted the entire file which contained the passwordless email
sign-in <br>handler and schema.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-93f300e99bd16f0fbe27fb8630f7878315c3796b16f02d5df28422b657c9bb96">+0/-134</a>&nbsp;
</td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Remove passwordless email
sign-in export</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>
      
src/routes/signin/passwordless/index.ts

- Removed export of passwordless email sign-in.



</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-808cfd9662f97c34ebc1c6ba7db98265192e9a36445601a5fd10b87c59790737">+0/-1</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>pat.ts</strong><dd><code>Remove PAT sign-in handler and
schema</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>
      
src/routes/signin/pat.ts

<li>Deleted the entire file which contained the PAT sign-in handler and
<br>schema.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-8c3fb3ef6d84d16f0cd0c84e05c0fb8175bd93342c3ae3c5f9c41e90b4c9a03b">+0/-60</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>email-password.ts</strong><dd><code>Remove
email-password sign-up handler and schema</code>&nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>
      
src/routes/signup/email-password.ts

<li>Deleted the entire file which contained the email-password sign-up
<br>handler and schema.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-f71930f7b3477cef0c5561206d29d9c81dca34fab5051645759ed61a5fb5ddee">+0/-54</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Remove sign-up
routes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>
      
src/routes/signup/index.ts

- Deleted the entire file which contained the sign-up routes.



</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-922b92cae424237ada9ba6f2d2c44862d16a7985f5fcf35126de6d69d1fa5a68">+0/-66</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Remove WebAuthn sign-up and
verification exports</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>
      
src/routes/signup/webauthn/index.ts

- Removed exports for WebAuthn sign-up and verification.



</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-49834b0a068a62d5ec6455a9bcd1087eba9ea5542e324aa5a7b8ae493a9d5047">+0/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>signup.ts</strong><dd><code>Remove WebAuthn sign-up
handler and schema</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>
      
src/routes/signup/webauthn/signup.ts

<li>Deleted the entire file which contained the WebAuthn sign-up handler
<br>and schema.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-faad8e77c59dd1b356e6599e005090b275b3e5c4eedc5f2f0c5bba6dfe0314d5">+0/-82</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>verify.ts</strong><dd><code>Remove WebAuthn sign-up
verification handler and schema</code>&nbsp; &nbsp; </dd></summary>
<hr>
      
src/routes/signup/webauthn/verify.ts

<li>Deleted the entire file which contained the WebAuthn sign-up
<br>verification handler and schema.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-e02c38f248f50a4ea4e1dcb68f788d02a24689cc445b69f7c0d3f7e27c91bf87">+0/-162</a>&nbsp;
</td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Remove token refresh
route</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></summary>
<hr>
      
src/routes/token/index.ts

- Removed import and usage of token refresh handler and schema.



</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-c2bb5010a945faf6edfb700cde9fd283e19df6130afda9c2264e83b70267304c">+0/-12</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>deanonymize.ts</strong><dd><code>Remove user
deanonymize handler and schema</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>
      
src/routes/user/deanonymize.ts

<li>Deleted the entire file which contained the user deanonymize handler
<br>and schema.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-90d734e80e04d31ddcdaedc256d9a9cf5a70b0396a8e371214a55095741b8be6">+0/-53</a>&nbsp;
&nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>change.ts</strong><dd><code>Remove user email change
handler and schema</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></summary>
<hr>
      
src/routes/user/email/change.ts

<li>Deleted the entire file which contained the user email change
handler <br>and schema.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-66691a14110253ef0e405ab918f81ed4c836e4a63824ee04759755bca0089199">+0/-112</a>&nbsp;
</td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Remove user email change and
verification exports</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></summary>
<hr>
      
src/routes/user/email/index.ts

<li>Removed exports for user email change and send verification email
<br>handlers.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-bdbd3726efe1ea00a547de3a90163d84f23c276ebfbfab7e63357708e0f57b5d">+0/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>send-verification-email.ts</strong><dd><code>Remove
user email send verification email handler and
schema</code></dd></summary>
<hr>
      
src/routes/user/email/send-verification-email.ts

<li>Deleted the entire file which contained the user email send
<br>verification email handler and schema.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-1e9502c3a3c4c4fa2454210e4fe46bb2623ce9505fe163766b0be11a6d8ce4a7">+0/-106</a>&nbsp;
</td>

</tr>                    

<tr>
  <td>
    <details>
<summary><strong>index.ts</strong><dd><code>Remove user email, password
reset, and deanonymize routes</code></dd></summary>
<hr>
      
src/routes/user/index.ts

<li>Removed imports and usage of user email change, send verification
<br>email, password reset, and deanonymize handlers and schemas.<br>


</details>
    

  </td>
<td><a
href="https://github.com/nhost/hasura-auth/pull/537/files#diff-14d43bc8570c6586d8a64c92ea9fe4ddd2a6fd85db68a8d0de8f7292c1476f36">+0/-73</a>&nbsp;
&nbsp; </td>

</tr>                    
</table></details></td></tr></tr></tbody></table>

___

> 💡 **PR-Agent usage**:
>Comment `/help` on the PR to get a list of all available PR-Agent tools
and their descriptions
2024-07-03 11:14:04 +02:00
David Barroso
c48e722676 fix: nodejs: remove helmet (#535) 2024-06-27 10:05:05 +02:00
David Barroso
4f5b2e124b chore: fix CI 2024-06-26 19:42:46 +02:00
David Barroso
f8ca298012 chore: update CI 2024-06-20 08:51:35 +02:00
dependabot[bot]
3bc6703f17 chore: bump actions/checkout from 2 to 4 (#530)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to
4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update default runtime to node20 by <a
href="https://github.com/takost"><code>@​takost</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li>
<li>Support fetching without the --progress option by <a
href="https://github.com/simonbaird"><code>@​simonbaird</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li>
<li>Release 4.0.0 by <a
href="https://github.com/takost"><code>@​takost</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1447">actions/checkout#1447</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/takost"><code>@​takost</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li>
<li><a
href="https://github.com/simonbaird"><code>@​simonbaird</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3...v4.0.0">https://github.com/actions/checkout/compare/v3...v4.0.0</a></p>
<h2>v3.6.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Mark test scripts with Bash'isms to be run via Bash by <a
href="https://github.com/dscho"><code>@​dscho</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1377">actions/checkout#1377</a></li>
<li>Add option to fetch tags even if fetch-depth &gt; 0 by <a
href="https://github.com/RobertWieczoreck"><code>@​RobertWieczoreck</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li>
<li>Release 3.6.0 by <a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/RobertWieczoreck"><code>@​RobertWieczoreck</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li>
<li><a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3.5.3...v3.6.0">https://github.com/actions/checkout/compare/v3.5.3...v3.6.0</a></p>
<h2>v3.5.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix: Checkout Issue in self hosted runner due to faulty submodule
check-ins by <a
href="https://github.com/megamanics"><code>@​megamanics</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1196">actions/checkout#1196</a></li>
<li>Fix typos found by codespell by <a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1287">actions/checkout#1287</a></li>
<li>Add support for sparse checkouts by <a
href="https://github.com/dscho"><code>@​dscho</code></a> and <a
href="https://github.com/dfdez"><code>@​dfdez</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1369">actions/checkout#1369</a></li>
<li>Release v3.5.3 by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1376">actions/checkout#1376</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/megamanics"><code>@​megamanics</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1196">actions/checkout#1196</a></li>
<li><a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1287">actions/checkout#1287</a></li>
<li><a href="https://github.com/dfdez"><code>@​dfdez</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1369">actions/checkout#1369</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3...v3.5.3">https://github.com/actions/checkout/compare/v3...v3.5.3</a></p>
<h2>v3.5.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix: Use correct API url / endpoint in GHES by <a
href="https://github.com/fhammerl"><code>@​fhammerl</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1289">actions/checkout#1289</a>
based on <a
href="https://redirect.github.com/actions/checkout/issues/1286">#1286</a>
by <a href="https://github.com/1newsr"><code>@​1newsr</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3.5.1...v3.5.2">https://github.com/actions/checkout/compare/v3.5.1...v3.5.2</a></p>
<h2>v3.5.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Improve checkout performance on Windows runners by upgrading
<code>@​actions/github</code> dependency by <a
href="https://github.com/BrettDong"><code>@​BrettDong</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1246">actions/checkout#1246</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/BrettDong"><code>@​BrettDong</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1246">actions/checkout#1246</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v4.1.7</h2>
<ul>
<li>Bump the minor-npm-dependencies group across 1 directory with 4
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li>
<li>Bump actions/checkout from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li>
<li>Check out other refs/* by commit by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li>
<li>Pin actions/checkout's own workflows to a known, good, stable
version. by <a href="https://github.com/jww3"><code>@​jww3</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1776">actions/checkout#1776</a></li>
</ul>
<h2>v4.1.6</h2>
<ul>
<li>Check platform to set archive extension appropriately by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1732">actions/checkout#1732</a></li>
</ul>
<h2>v4.1.5</h2>
<ul>
<li>Update NPM dependencies by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1703">actions/checkout#1703</a></li>
<li>Bump github/codeql-action from 2 to 3 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1694">actions/checkout#1694</a></li>
<li>Bump actions/setup-node from 1 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1696">actions/checkout#1696</a></li>
<li>Bump actions/upload-artifact from 2 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1695">actions/checkout#1695</a></li>
<li>README: Suggest <code>user.email</code> to be
<code>41898282+github-actions[bot]@users.noreply.github.com</code> by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1707">actions/checkout#1707</a></li>
</ul>
<h2>v4.1.4</h2>
<ul>
<li>Disable <code>extensions.worktreeConfig</code> when disabling
<code>sparse-checkout</code> by <a
href="https://github.com/jww3"><code>@​jww3</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1692">actions/checkout#1692</a></li>
<li>Add dependabot config by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1688">actions/checkout#1688</a></li>
<li>Bump the minor-actions-dependencies group with 2 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1693">actions/checkout#1693</a></li>
<li>Bump word-wrap from 1.2.3 to 1.2.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1643">actions/checkout#1643</a></li>
</ul>
<h2>v4.1.3</h2>
<ul>
<li>Check git version before attempting to disable
<code>sparse-checkout</code> by <a
href="https://github.com/jww3"><code>@​jww3</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1656">actions/checkout#1656</a></li>
<li>Add SSH user parameter by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1685">actions/checkout#1685</a></li>
<li>Update <code>actions/checkout</code> version in
<code>update-main-version.yml</code> by <a
href="https://github.com/jww3"><code>@​jww3</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1650">actions/checkout#1650</a></li>
</ul>
<h2>v4.1.2</h2>
<ul>
<li>Fix: Disable sparse checkout whenever <code>sparse-checkout</code>
option is not present <a
href="https://github.com/dscho"><code>@​dscho</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1598">actions/checkout#1598</a></li>
</ul>
<h2>v4.1.1</h2>
<ul>
<li>Correct link to GitHub Docs by <a
href="https://github.com/peterbe"><code>@​peterbe</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1511">actions/checkout#1511</a></li>
<li>Link to release page from what's new section by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1514">actions/checkout#1514</a></li>
</ul>
<h2>v4.1.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1396">Add
support for partial checkout filters</a></li>
</ul>
<h2>v4.0.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1067">Support
fetching without the --progress option</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1436">Update to
node20</a></li>
</ul>
<h2>v3.6.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1377">Fix: Mark
test scripts with Bash'isms to be run via Bash</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/579">Add
option to fetch tags even if fetch-depth &gt; 0</a></li>
</ul>
<h2>v3.5.3</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1196">Fix:
Checkout fail in self-hosted runners when faulty submodule are
checked-in</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1287">Fix
typos found by codespell</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="692973e3d9"><code>692973e</code></a>
Prepare 4.1.7 release (<a
href="https://redirect.github.com/actions/checkout/issues/1775">#1775</a>)</li>
<li><a
href="6ccd57f4c5"><code>6ccd57f</code></a>
Pin actions/checkout's own workflows to a known, good, stable version.
(<a
href="https://redirect.github.com/actions/checkout/issues/1776">#1776</a>)</li>
<li><a
href="b17fe1e4d5"><code>b17fe1e</code></a>
Handle hidden refs (<a
href="https://redirect.github.com/actions/checkout/issues/1774">#1774</a>)</li>
<li><a
href="b80ff79f17"><code>b80ff79</code></a>
Bump actions/checkout from 3 to 4 (<a
href="https://redirect.github.com/actions/checkout/issues/1697">#1697</a>)</li>
<li><a
href="b1ec3021b8"><code>b1ec302</code></a>
Bump the minor-npm-dependencies group across 1 directory with 4 updates
(<a
href="https://redirect.github.com/actions/checkout/issues/1739">#1739</a>)</li>
<li><a
href="a5ac7e51b4"><code>a5ac7e5</code></a>
Update for 4.1.6 release (<a
href="https://redirect.github.com/actions/checkout/issues/1733">#1733</a>)</li>
<li><a
href="24ed1a3528"><code>24ed1a3</code></a>
Check platform for extension (<a
href="https://redirect.github.com/actions/checkout/issues/1732">#1732</a>)</li>
<li><a
href="44c2b7a8a4"><code>44c2b7a</code></a>
README: Suggest <code>user.email</code> to be
`41898282+github-actions[bot]<a
href="https://github.com/users"><code>@​users</code></a>.norepl...</li>
<li><a
href="8459bc0c7e"><code>8459bc0</code></a>
Bump actions/upload-artifact from 2 to 4 (<a
href="https://redirect.github.com/actions/checkout/issues/1695">#1695</a>)</li>
<li><a
href="3f603f6d5e"><code>3f603f6</code></a>
Bump actions/setup-node from 1 to 4 (<a
href="https://redirect.github.com/actions/checkout/issues/1696">#1696</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/checkout/compare/v2...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=2&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-14 11:48:21 +02:00
David Barroso
05ab45b5b8 fix: remove email from required fields as some users may not have one (#529)
Fixes #526
2024-06-13 14:35:02 +02:00
David Barroso
067dd7b761 chore: fix ci 2024-06-13 13:25:32 +02:00
David Barroso
78701f6521 chore: update nixops and allow running CI with secrets for contributors (#528)
CI is broken due to the pull_request_target... won't be fixed until it
is merged.
2024-06-13 12:21:08 +02:00
Boris Bliznioukov
316e0efaa0 feat: Add date to email headers in Send function (#527)
Implement 'Date' header to comply with email RFC standards and enhance
deliverability by satisfying spam filters.
2024-06-13 08:08:39 +02:00
David Barroso
23273dec3f chore: update pull_request events to pull_request_target 2024-06-12 11:15:25 +02:00
github-actions[bot]
eccc7dcd3d [Scheduled] Update dependencies (#524)
Dependencies updated

Note - If you see this PR and the checks haven't run, close and reopen
the PR. See
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs

---------

Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-06-03 15:58:47 +02:00
David Barroso
155357345a fix: allow using a different connection string for migrations (#521) 2024-05-22 15:20:57 +02:00
Hassan Ben Jobrane
6d2fcaf751 feat: allow deep links in redirectTo validation (#513) 2024-05-20 11:17:19 +01:00
David Barroso
dc5d3748ae fix: test 2024-05-16 18:04:35 +02:00
David Barroso
a893f8e093 fix: don't create a webauthn controller if not configured (#519) 2024-05-16 17:49:01 +02:00
David Barroso
d0b75b6d87 fix: backward compatibility changes to matching of redirect URLs (#518) 2024-05-10 13:04:05 +02:00
David Barroso
f1ecd32104 chore: remove typescript message from README.md (#517) 2024-05-08 12:37:33 +02:00
dependabot[bot]
43889c9809 chore: bump nixbuild/nix-quick-install-action from 27 to 28 (#516)
Bumps
[nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action)
from 27 to 28.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/releases">nixbuild/nix-quick-install-action's
releases</a>.</em></p>
<blockquote>
<h2>nixbuild/nix-quick-install-action@v28</h2>
<h2>Changes</h2>
<ul>
<li>
<p>Remove all Nix versions that are vulnerable to <a
href="https://www.cve.org/CVERecord?id=CVE-2024-27297">CVE-2024-27297</a>.</p>
</li>
<li>
<p>Bump minor Nix versions: 2.18.1 -&gt; 2.18.2</p>
</li>
<li>
<p>Add Nix versions: 2.20.5, 2.21.0</p>
</li>
<li>
<p>Bump default Nix version: 2.19.3 -&gt; 2.21.0</p>
</li>
</ul>
<h2>Supported Nix Versions on Linux Runners</h2>
<ul>
<li>2.21.0</li>
<li>2.20.5</li>
<li>2.19.3</li>
<li>2.18.2</li>
<li>2.3.17</li>
</ul>
<h2>Supported Nix Versions on MacOS Runners</h2>
<ul>
<li>2.21.0</li>
<li>2.20.5</li>
<li>2.19.3</li>
<li>2.18.2</li>
<li>2.3.17</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE">nixbuild/nix-quick-install-action's
changelog</a>.</em></p>
<blockquote>
<p>v28</p>
<h2>Changes</h2>
<ul>
<li>
<p>Remove all Nix versions that are vulnerable to <a
href="https://www.cve.org/CVERecord?id=CVE-2024-27297">CVE-2024-27297</a>.</p>
</li>
<li>
<p>Bump minor Nix versions: 2.18.1 -&gt; 2.18.2</p>
</li>
<li>
<p>Add Nix versions: 2.20.5, 2.21.0</p>
</li>
<li>
<p>Bump default Nix version: 2.19.3 -&gt; 2.21.0</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="60e9c39264"><code>60e9c39</code></a>
Release v28</li>
<li><a
href="2eeac83915"><code>2eeac83</code></a>
Downgrade nixpkgs because of MacOS build error</li>
<li><a
href="0ff55bf498"><code>0ff55bf</code></a>
Remove Nix 2.22 temporarily</li>
<li><a
href="49704930ae"><code>4970493</code></a>
Bump Nix versions</li>
<li><a
href="f188189575"><code>f188189</code></a>
cicd: Fix Nix version</li>
<li><a
href="ac5ac3025c"><code>ac5ac30</code></a>
Merge pull request <a
href="https://redirect.github.com/nixbuild/nix-quick-install-action/issues/42">#42</a>
from nixbuild/nix_2_2x</li>
<li><a
href="de77414845"><code>de77414</code></a>
cicd: Try fix test that fails on MacOS 11/nix 2.21.0</li>
<li><a
href="b657bdb7f8"><code>b657bdb</code></a>
Add Nix 2.20.5 and 2.21.0</li>
<li><a
href="3e26077f8d"><code>3e26077</code></a>
Update README and workflows for v27</li>
<li>See full diff in <a
href="https://github.com/nixbuild/nix-quick-install-action/compare/v27...v28">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nixbuild/nix-quick-install-action&package-manager=github_actions&previous-version=27&new-version=28)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-05-03 08:01:14 +02:00
David Barroso
1978f4f8d8 fix: modify migrations to avoid writing in public schema (#515) 2024-05-03 08:00:20 +02:00
github-actions[bot]
3456123991 asd (#512)
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-05-01 20:05:41 +02:00
David Barroso
8bb4dcfe83 fix: dont crash if users have no roles when refreshing token (#511)
* fix: dont crash if users have no roles when refreshing token

* asd
2024-04-30 16:38:17 +02:00
David Barroso
72d7e29a0f sad (#510) 2024-04-29 13:32:21 +02:00
David Barroso
16d336d6ac fix: sanitize subject/to before sending email (#509) 2024-04-29 13:32:12 +02:00
David Barroso
a6d3f8e9e5 fix: special treatment to custom claims for backwards compatibility #505 (#505) 2024-04-22 14:41:41 +02:00
David Barroso
4e7dcc98eb fix: remove as many RTTs to postgres as possible (#506) 2024-04-22 11:05:34 +02:00
David Barroso
7b6c5fbbb0 fix: grant: respect dynamic options (#503) 2024-04-12 10:23:57 +02:00
David Barroso
5bf4a95dfe fix: verify hostname during STARTTLS correctly (#504) 2024-04-12 10:23:38 +02:00
David Barroso
94dbc53159 build: lock execa to >=2.0.0 (#500)
Co-authored-by: Sumanth Chinthagunta <xmlking@gmail.com>
2024-04-08 13:52:01 +02:00
David Barroso
afab4da826 fix: go: minor fixes in /token endpoint (#501) 2024-04-08 13:51:49 +02:00
Nuno Pato
5ed6f9acf3 feat: go: migrate /token (#492) 2024-04-05 14:53:18 +02:00
David Barroso
e08950cfff fix: support SMTP over TLS (#498) 2024-04-04 16:33:58 +02:00
David Barroso
ed8edf338a fix: regression - return refreshTokenID alongside session as before (#496) 2024-04-04 16:22:10 +02:00
David Barroso
cf82693dd5 chore: update deps due to GO-2024-2687 (#497) 2024-04-04 12:34:59 +02:00
David Barroso
b7903c69ca fix: minor fixes to startup config (#495) 2024-04-03 13:22:12 +02:00
github-actions[bot]
5cadff514f [Scheduled] Update dependencies (#493)
* Update dependencies

* pnpm audit

---------

Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
Co-authored-by: David Barroso <dbarrosop@dravetech.com>
2024-04-02 10:47:07 +02:00
David Barroso
5523fec2b6 chore: fix: nix non-native build 2024-03-26 08:54:02 +01:00
David Barroso
642e82d35c fix: minor fixes (#490) 2024-03-23 08:47:45 +01:00
David Barroso
243efd12c7 feat: added integration with postmark (#484) 2024-03-22 16:14:20 +01:00
David Barroso
dd03035898 feat: go: migrate /signup/webauthn[/verify] (#487) 2024-03-22 16:00:36 +01:00
David Barroso
307873fec2 feat: go: migrate /user/deanonymize (#488) 2024-03-22 15:22:15 +01:00
David Barroso
5472bedaa1 feat: go: added middleware for elevated check (#489) 2024-03-22 14:56:19 +01:00
David Barroso
04b75ab193 feat: go: migrated /user/email/send-verification-email (#485) 2024-03-21 15:07:38 +01:00
David Barroso
b69719720c feat: allow connecting social logins to existing users even if emails don't match (#459)
* asd

* asd

* asd
2024-03-18 13:45:36 +01:00
David Barroso
f3a9283461 chore: go: refactor (#483) 2024-03-18 13:45:15 +01:00
dependabot[bot]
6302971947 chore: bump nixbuild/nix-quick-install-action from 26 to 27 (#482)
Bumps [nixbuild/nix-quick-install-action](https://github.com/nixbuild/nix-quick-install-action) from 26 to 27.
- [Release notes](https://github.com/nixbuild/nix-quick-install-action/releases)
- [Changelog](https://github.com/nixbuild/nix-quick-install-action/blob/master/RELEASE)
- [Commits](https://github.com/nixbuild/nix-quick-install-action/compare/v26...v27)

---
updated-dependencies:
- dependency-name: nixbuild/nix-quick-install-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-18 11:03:35 +01:00
David Barroso
5406876129 feat: go: migrate /pat and /signin/pat (#481) 2024-03-15 12:57:50 +01:00
David Barroso
a56642846d feat: go: migrate /healthz and /version (#480)
* feat: go: migrate /healthz and /version

* asd

* asd
2024-03-15 12:17:22 +01:00
David Barroso
a094a463e7 feat: go: migrate /user/password/reset (#479) 2024-03-15 08:37:18 +01:00
David Barroso
a7f507ab94 feat: go: migrate /signin/passwordless/email (#478) 2024-03-15 08:12:53 +01:00
David Barroso
ca3a2087f1 feat: go: migrate /user/email/change (#477) 2024-03-15 08:09:48 +01:00
David Barroso
88038fbade feat: go: migrate /signin/email-password (#476) 2024-03-12 08:34:41 +01:00
David Barroso
45315c7de1 chore: node: update webauthn dependencies (#474) 2024-03-06 09:57:26 +01:00
David Barroso
d8915e54a3 fix: go: automatically use paths compatible with cli/prod (#473) 2024-03-05 15:07:31 +01:00
David Barroso
2373bd72cd fix: go: add default locale/roles to allowed list (#472) 2024-03-05 12:49:07 +01:00
David Barroso
8a471a7a77 migrate: /signup/email-password (#467) 2024-03-05 08:58:21 +01:00
David Barroso
ef2cc0810d chore: fix role to assume in gen update dependencies (#470)
* chore: fix role to assume in gen update dependencies

* asd

* Update dependencies (#471)

Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: dbarrosop <dbarrosop@users.noreply.github.com>
2024-03-01 14:02:54 +01:00
dependabot[bot]
4484269204 chore: bump github/codeql-action from 2 to 3 (#466)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-16 08:55:33 +01:00
David Barroso
8311fa9af2 feat: add golang entrypoint that acts as reverse-proxy when routes don't match (#464) 2024-02-16 08:47:59 +01:00
github-actions[bot]
6534613393 chore: update versions (#465)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-13 19:19:02 +01:00
David Barroso
0c52594654 feat: added AUTH_REQUIRE_ELEVATED_CLAIM to require elevated permissions for certain actions (#462) 2024-02-13 18:36:26 +01:00
github-actions[bot]
b865c27d05 chore: update versions (#461)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-02-06 13:49:11 +01:00
David Barroso
27aeca6a0f fix: replace helper.error with helper.message due to joi's breaking changes (#463) 2024-02-06 10:37:20 +01:00
David Barroso
61aa87dbd2 Create SECURITY.md 2024-02-06 10:14:40 +01:00
David Barroso
fcec7fabdf chore: update deps (#460) 2024-02-02 19:51:58 +01:00
David Barroso
93abd359a9 feat: added endpoint to "elevate" permissions using webauthn (#451) 2024-02-02 19:44:10 +01:00
github-actions[bot]
8d454973d8 chore: update versions (#454)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2024-01-11 13:09:25 +01:00
David Barroso
68aa985498 chore: add pnpm audit to the CI and update deps (#457)
* chore: add pnpm audit to the CI and update deps

* fix: add axios module to moduleNameMapper in jest.config.js

* fix: add missing type in validation

* chore: add changeset

---------

Co-authored-by: Hassan Ben Jobrane <hsanbenjobrane@gmail.com>
2024-01-11 13:07:55 +01:00
David Barroso
011516e5d9 fix: parse metadata during the oauth callback (#458) 2024-01-11 12:24:56 +01:00
Quentin Decré
00b3994ae1 fix: added an index on refresh_tokens to improve lookup performance (#453) 2023-12-04 15:17:59 +01:00
github-actions[bot]
19316ad884 chore: update versions (#449)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-28 11:37:14 +01:00
Hassan Ben Jobrane
634f2bfe2d feat: add AUTH_WEBAUTHN_RP_ID environment variable (#446)
* feat: add AUTH_WEBAUTHN_RP_ID environment variable

* test(webauthn): add test when rpId set in environment variables

* chore: add changeset

* chore: update AUTH_WEBAUTHN_RP_ID description

* fix: typo in `AUTH_WEBAUTHN_RP_ID` description
2023-11-28 11:26:20 +01:00
ErwinPetit
2e3096cc9f fix: conceal error if AUTH_CONCEAL_ERRORS is set (#445)
* fix: conceal error if AUTH_CONCEAL_ERRORS is set

* chore: add changeset

---------

Co-authored-by: Hassan Ben Jobrane <hsanbenjobrane@gmail.com>
2023-11-28 11:14:12 +01:00
github-actions[bot]
b6b1afd2cf chore: update versions (#442)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-16 13:27:20 +01:00
Hassan Ben Jobrane
cd8c786751 feat: disable signup (#444)
* feat: validate signup disabled during email/password registration

* fix: return forbidden status code for disabled sign up

* feat: check if signup is disabled upon OAuth registration

* chore: remove unnecessary blank line in app.ts

* feat: check if signup is disabled upon passwordless email signup

* feat: check if signup disabled upon passwordless SMS signin

* feat: check if disabled upon signup via webauthn

* chore: add changeset

* chore: update docs about `AUTH_DISABLE_SIGNUP`
2023-11-15 17:03:33 +01:00
Hassan Ben Jobrane
15459a92fe fix: use empty as AUTH_API_PREFIX default value (#443)
* fix: use empty as AUTH_API_PREFIX default value

* chore: add changeset
2023-11-14 10:51:22 +01:00
Hassan Ben Jobrane
003cfd6bff fix: make sure existing modified permissions are not overwritten (#424)
* fix: make sure existing modified permissions are not overwritten

* chore: add changeset
2023-11-13 17:11:43 +01:00
David Barroso
ffba7d8402 fix: move catch-all route-not-found handler to root (#440) 2023-11-13 16:19:25 +01:00
github-actions[bot]
377a846708 chore: update versions (#441)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-13 14:11:52 +01:00
Hassan Ben Jobrane
b727ab9f0e fix: update linkedin oauth provider configuration (#438)
* fix: update linkedin oauth provider configuration

* chore: add changeset
2023-11-13 13:59:19 +01:00
github-actions[bot]
eef9c803c9 chore: update versions (#431)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-08 13:34:36 +01:00
David Barroso
024258cc12 feat: set oauth origin dynamically based on host header (#427) 2023-11-08 13:27:13 +01:00
Hassan Ben Jobrane
c3fcb7f5c4 fix(ci): update GitHub workflow to push to Docker Hub with git tag (#432) 2023-11-07 11:54:28 +01:00
David Barroso
044ed00fcf fix: mount oauth and healthz routes correctly when specifying AUTH_API_PREFIX (#433)
* fix: mount oauth and healthz routes correctly when specifying AUTH_API_PREFIX

* asd
2023-11-07 11:40:07 +01:00
David Barroso
5663eecea7 feat: allow configuring api prefix (#430) 2023-11-06 16:12:19 +01:00
github-actions[bot]
e1ec543853 chore: update versions (#418)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-11-06 13:12:16 -01:00
Tyrone Chris Abad
2aa0d6d6ca fix: incorrect assignment of displayName for Apple OAuth (#425)
* fix: incorrect assignment of `displayName`

* fix: incorrect param being used to get user info

* fix: profile no longer becomes stringified if user is already existing

* refactor(oauth): parse the user displayName properly

* chore: refactor handler for apple oauth

* chore: add changeset

* chore: add error message when parsing user data from Apple's response

* chore: adjust warning message

---------

Co-authored-by: Tyrone <tyronechris67@gmail.com>
Co-authored-by: Hassan Ben Jobrane <hsanbenjobrane@gmail.com>
2023-11-06 12:00:49 +01:00
David Barroso
59e588ae4a chore: added codeql (#417)
* chore: added codeql

* added changeset

* asd
2023-09-21 13:26:44 +02:00
github-actions[bot]
962e7b7561 chore: update versions (#414)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-09-15 16:17:37 +01:00
Hassan Ben Jobrane
4eff7f4958 fix: send back refresh token after a sign-in with pat (#412)
* fix: send back refresh token after a signin with pat

* chore: add changeset
2023-09-15 16:09:30 +01:00
github-actions[bot]
44c7d9e1ab chore: update versions (#409)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-07-12 13:48:33 +01:00
Alex
ca5010d5bc bugfix(hasura-auth) keep select and delete permissions already set in metadata for auth tables instead of overriding them (#407)
* bugfix(hasura-auth) keep select and delete permissions already set in metadata for auth tables instead of overriding them

* chore: add changeset

---------

Co-authored-by: Hassan Ben Jobrane <hsanbenjobrane@gmail.com>
2023-07-12 13:13:57 +01:00
github-actions[bot]
87fee13f4e chore: update versions (#402)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-23 10:25:20 +02:00
Szilárd Dóró
840d730ad7 feat(email): add support for x-smtpapi header (#401)
* feat(email): add support for `x-smtpapi` header

* chore: add changeset
2023-06-23 08:32:28 +02:00
github-actions[bot]
072d25fd3e chore: update versions (#399)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-06-23 08:23:37 +02:00
Steve Grosbois
1706c37051 fix: Fixed useless "&" char on createEmailRedirectionLink function (#363)
* fix: Fixed useless & on createEmailRedirectionLink function

* chore: add changeset

---------

Co-authored-by: Szilárd Dóró <doroszilard@gmail.com>
2023-06-19 15:01:08 +02:00
Szilárd Dóró
7a07b50939 chore(tests): use the same testing method for local and CI (#400)
* chore: use the same testing method for local and CI

* fix: don't break CI

* fix: don't break CI

* fix: use correct env vars

* fix: don't break CI

* fix: use correct env vars

* fix: use correct env vars

* chore: remove artifact upload step from CI
2023-06-19 14:44:17 +02:00
Steve Grosbois
60dcbf417a fix: Fixed typos for french (#392)
* fix: Fixed typos for french

* chore: add changeset

---------

Co-authored-by: Szilárd Dóró <doroszilard@gmail.com>
2023-06-19 11:22:47 +02:00
Szilárd Dóró
ceaca45112 chore: improve logging and bump Node.js to v18 (#398)
* chore(logs): improve logging in production

- bump Node.js to v18

* chore: add changeset
2023-06-19 11:16:00 +02:00
github-actions[bot]
0a4e4b315d chore: update versions (#395)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-31 16:38:27 +02:00
Ian Gabriel Sanchez
0cc9d36f2c Handle comma separated allowed roles (#391)
* fix: Fix issue where hasura-auth crashes when adding allowed roles upon signin with provider

* chore: Run prettier

* chore: Update .changeset/strange-seas-whisper.md

Co-authored-by: Szilárd Dóró <doroszilard@gmail.com>

---------

Co-authored-by: Szilárd Dóró <doroszilard@gmail.com>
2023-05-31 16:21:36 +02:00
github-actions[bot]
fe87694e88 chore: update versions (#387)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-17 10:23:21 +02:00
Szilárd Dóró
d412a931f2 feat: add refreshTokenId to the session (#386)
* feat: add `refreshTokenId` to the session object

* chore: update `pnpm-lock` to use v6

* bump pnpm version

* bump pnpm version in the Dockerfile

* feat: add null refreshTokenId to the /signin/pat endpoint
2023-05-16 13:02:56 +02:00
github-actions[bot]
3b1fbcec52 chore: update versions (#384)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-15 15:19:21 +02:00
Szilárd Dóró
50a1b1d60c chore: migrate refresh_token column to id (#374) 2023-05-15 15:07:21 +02:00
Szilárd Dóró
b2a1dbb8fc chore: add probot (#383) 2023-05-11 10:26:11 +02:00
github-actions[bot]
b156b1d712 chore: update versions (#380)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-05-09 15:55:02 +02:00
Szilárd Dóró
5529f7de3f fix(pat): improve logs and replace enum type (#381)
* chore: extend PAT logging

* fix: replace 'CREATE TYPE' with a proper enum table

* chore: add changeset

* fix: update terminology

* fix: don't break tests
2023-05-09 15:01:38 +02:00
Szilárd Dóró
29eff81383 fix: be more verbose when a provider fails (#378)
* fix: be more verbose when a provider fails

* chore: improve readability

* fix: don't break tests
2023-05-08 14:23:18 +02:00
Szilárd Dóró
005e259ff6 chore(logs): add env var to control visibility in logs (#379)
* chore: add `AUTH_SHOW_LOG_QUERY_PARAMS` env var

* fix: don't break tests

* revert env var

* chore: add docs

* fix tests
2023-05-05 12:20:31 +02:00
github-actions[bot]
bc73097f1b chore: update versions (#366)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-04-27 14:20:43 +02:00
Szilárd Dóró
9a7e02791a chore: improve log verbosity (#372)
* chore: improve log verbosity

* chore: add changeset

* fix: log unhandled exceptions and rejections

* feat: increase verbosity for 4xx / 5xx error logs
2023-04-26 16:59:32 +02:00
Szilárd Dóró
6fd10dca14 fix: migrate refresh_tokens metadata (#370)
* fix: migrate metadata

* fix: update test snapshots
2023-04-24 09:06:29 +02:00
Szilárd Dóró
08c2fbb80f fix: unify user session object (#369) 2023-04-24 09:02:14 +02:00
Szilárd Dóró
11e1eb3788 feat: Personal Access Tokens (#365)
* feat: add basic PAT support

* chore: reorganize PAT routes

* fix: pin `pnpm` version

* chore: add tests

* chore: remove unnecessary `refreshToken`

* fix: use correct error message

* chore: improve validation, extend tests

* chore: add changeset
2023-04-19 17:32:17 +02:00
github-actions[bot]
171aa8e659 chore: update versions (#360)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-03-20 17:15:49 -01:00
Nuno Pato
73b7642a37 add missing changeset (#359) 2023-03-20 16:37:53 -01:00
Nuno Pato
993ca5720b allow wildcard urls (#353)
* add back support for wildcard domains in redirectUrl

* asd

* asd

* asd

* asd
2023-03-17 15:48:28 -01:00
github-actions[bot]
42e14c855c chore: update versions (#349)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-02-17 15:25:58 -01:00
Nuno Pato
2eadfa97d2 Fix/redirect url validation (#348)
* Revert https://github.com/nhost/hasura-auth/pull/317

* asd

* use URL.hostname to make sure the domain name is the same

* asd
2023-02-17 12:04:26 -01:00
Nuno Pato
f7ec32fe02 Revert #317 (#347)
* Revert https://github.com/nhost/hasura-auth/pull/317

* asd

* asd
2023-02-17 10:50:14 -01:00
github-actions[bot]
55d4c66c72 chore: update versions 2023-01-27 09:47:27 +01:00
Asen Lekov
fff9d1f4a0 feat: translate email templates to Bulgarian 2023-01-23 10:35:29 +01:00
Pilou
de0b16325f Create clever-pianos-bake.md 2023-01-23 10:34:42 +01:00
Antonio J. Rodriguez
4f7cb06c67 feat: 🎸 translate email templates to spanish
Added suppor for Spanish language email templates
2023-01-23 10:34:42 +01:00
Pierre-Louis Mercereau
aea5d198ee chore: narrow oauth callback middleware route 2023-01-17 08:36:43 +01:00
Pilou
87a3e96687 Create hungry-insects-reflect.md 2023-01-13 21:39:56 +01:00
Evzen Supler
1c89e2d781 Change language code to cs 2023-01-13 21:39:56 +01:00
Evzen Supler
5bdb917d5e Add cz email templates 2023-01-13 21:39:56 +01:00
Pierre-Louis Mercereau
8b7a4b158d fix: return inserted user_provider 2023-01-11 14:27:14 +01:00
Pierre-Louis Mercereau
e538807b47 fix: default redirection 2023-01-11 13:50:47 +01:00
Olivier Fuxet
27bd02f691 fix: no refresh token for a new first-time user 2023-01-11 12:09:21 +01:00
Pierre-Louis Mercereau
de38369235 fix: correct redirect url with oauth 2023-01-11 12:08:51 +01:00
Olivier Fuxet
e0b9f13429 fix: wrong call to insertUserProviderToUser 2023-01-10 18:38:26 +01:00
Olivier Fuxet
a038291eae fix: error INSERT has more expressions than target columns 2023-01-10 18:38:26 +01:00
Olivier Fuxet
c5c82506cd fix: error Cannot read properties of undefined (reading 'id') 2023-01-10 18:38:26 +01:00
Olivier Fuxet
e4daa58f96 fix: error missing FROM-clause entry for table "up" 2023-01-10 16:37:16 +01:00
Pierre-Louis Mercereau
829ebd8fd9 chore: update changeset 2023-01-10 08:36:51 +01:00
Pierre-Louis Mercereau
5a224e69ca fix: Improve the logging of SMTP errors 2023-01-09 19:45:37 +01:00
Olivier Fuxet
3080132752 fix: user roles are not properly aggregated 2023-01-09 19:44:47 +01:00
Olivier Fuxet
b398ae2302 feat(custom-claims)!: when a claim is expected to be an array and is empty, set its value to {} instead of undefined 2023-01-07 18:08:53 +01:00
Pierre-Louis Mercereau
9ffb459d9a chore: improve template typings, and correct a bug in an sql instruction 2023-01-05 10:30:35 +01:00
Pierre-Louis Mercereau
1d413fb871 chore: Johan's suggestions 2023-01-05 09:57:50 +01:00
Pierre-Louis Mercereau
30bcd09cc6 Merge branch 'main' into refactor/sql-operations 2023-01-04 19:08:39 +01:00
Pierre-Louis Mercereau
cb5d650c50 chore: change max pool connections to 50, same as Hasura 2023-01-04 17:22:37 +01:00
Pierre-Louis Mercereau
8e3d49b9c8 chore: update changeset 2023-01-04 09:08:55 +01:00
Pierre-Louis Mercereau
45afb45ebc chore: stop sending refresh tokens in the hash part of redirection urls 2023-01-04 09:08:55 +01:00
Pilou
14af6229b2 Update src/routes/signup/webauthn/verify.ts
Co-authored-by: Nuno Pato <nunopato@gmail.com>
2023-01-04 08:47:55 +01:00
Pilou
bb864f1d66 Update src/utils/postgres-client/index.ts
Co-authored-by: Nuno Pato <nunopato@gmail.com>
2023-01-04 08:47:44 +01:00
Pierre-Louis Mercereau
ec38a08017 Merge branch 'main' into refactor/sql-operations 2023-01-03 14:19:55 +01:00
Pierre-Louis Mercereau
015a7a00d4 refactor: codegen 2023-01-02 15:51:53 +01:00
Pilou
5e2bb6368f Update src/gql/refresh-tokens.graphql
Co-authored-by: Johan Eliasson <johan@nhost.io>
2023-01-02 15:51:53 +01:00
Pilou
893a30127b Update .changeset/silver-cars-applaud.md
Co-authored-by: Johan Eliasson <johan@nhost.io>
2023-01-02 15:51:53 +01:00
Pierre-Louis Mercereau
f669c5c737 test: update snapshot 2023-01-02 15:51:53 +01:00
Pierre-Louis Mercereau
9448b7e7e8 refactor: rename hashed_refresh_token to refresh_token_hash 2023-01-02 15:51:53 +01:00
Pierre-Louis Mercereau
2e15427ec2 chore: changeset 2023-01-02 15:51:53 +01:00
Pierre-Louis Mercereau
8b9f249031 fix: use the Postgres sha256 hexadecimal syntax 2023-01-02 15:51:53 +01:00
Pierre-Louis Mercereau
b1077ed1db style: empty line 2023-01-02 15:51:53 +01:00
Pierre-Louis Mercereau
e91d667587 refactor 2023-01-02 15:51:53 +01:00
Pierre-Louis Mercereau
1c7ffedaf9 test: update snapshot 2023-01-02 15:51:53 +01:00
Pierre-Louis Mercereau
8d49471051 fix: correct sha256 2023-01-02 15:51:53 +01:00
Pierre-Louis Mercereau
f53b7409b3 fix: correct file name and generated expression 2023-01-02 15:51:53 +01:00
Pierre-Louis Mercereau
92830004a7 feat: add a hashed_refresh_token column 2023-01-02 15:51:53 +01:00
Pierre-Louis Mercereau
577570a14a chore: add missing properties to SessionUser 2022-12-29 12:04:58 +01:00
Pierre-Louis Mercereau
a9dfb173b2 chore: remove commitlint 2022-12-29 11:22:40 +01:00
Pierre-Louis Mercereau
696fcb0593 chore: remove unused depdendency 2022-12-29 11:20:39 +01:00
Pierre-Louis Mercereau
db3b7a979e chore: limit user fields sent as part of the session 2022-12-29 11:15:17 +01:00
Pierre-Louis Mercereau
d5eed8fa5b chore: changeset 2022-12-29 11:03:25 +01:00
Pierre-Louis Mercereau
5107e7c254 chore: correct webauthn sql operations 2022-12-29 10:47:41 +01:00
Pierre-Louis Mercereau
6be99f06a8 chore: improve and debug 2022-12-29 10:33:21 +01:00
Pierre-Louis Mercereau
9bcd66f362 refactor: replace the remaining 14 gql ops, and clean 2022-12-28 22:35:53 +01:00
Pierre-Louis Mercereau
97023e12e7 refactor: remove 5 more graphql operations 2022-12-28 18:26:21 +01:00
Pierre-Louis Mercereau
9695ca57d7 refactor: convert 13 graphql operations into sql 2022-12-28 18:08:23 +01:00
github-actions[bot]
d11cabf8d3 chore: update versions (#313)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2022-12-22 15:57:40 -01:00
Pilou
1e48c9f63f Update .changeset/quiet-berries-develop.md
Co-authored-by: Johan Eliasson <johan@nhost.io>
2022-12-22 16:36:03 +01:00
Pilou
ee81d85a91 Update .changeset/quiet-berries-develop.md
Co-authored-by: Johan Eliasson <johan@nhost.io>
2022-12-22 16:36:03 +01:00
Pilou
17b2418e22 Update .changeset/quiet-berries-develop.md
Co-authored-by: Johan Eliasson <johan@nhost.io>
2022-12-22 16:36:03 +01:00
Pilou
d209e3c6e0 Update .changeset/quiet-berries-develop.md
Co-authored-by: Johan Eliasson <johan@nhost.io>
2022-12-22 16:36:03 +01:00
Pilou
2ec1393900 Update .changeset/quiet-berries-develop.md
Co-authored-by: Johan Eliasson <johan@nhost.io>
2022-12-22 16:36:03 +01:00
Pierre-Louis Mercereau
f85e92d5c4 refactor: allow implicit allowed roles/locales 2022-12-22 16:36:03 +01:00
Pilou
02da92a585 fix: workos query parameters (#312) 2022-12-21 17:51:52 -01:00
Pierre-Louis Mercereau
a4517f6877 ci: use the cli action 2022-12-12 08:34:29 +01:00
Pierre-Louis Mercereau
fc9dba4887 ci: try realpath 2022-12-12 08:34:29 +01:00
Pierre-Louis Mercereau
f6a80a00cc ci: fine-tune 2022-12-12 08:34:29 +01:00
Pierre-Louis Mercereau
61c76dd256 ci: corrections 2022-12-12 08:34:29 +01:00
Pierre-Louis Mercereau
3a080b8ba9 ci: put things in the right place 2022-12-12 08:34:29 +01:00
Pierre-Louis Mercereau
c752050f41 ci: every test 2022-12-12 08:34:29 +01:00
Pierre-Louis Mercereau
a3bf06aa16 ci: fix yq file path 2022-12-12 08:34:29 +01:00
Pierre-Louis Mercereau
6acc71c7bb ci: correct paths 2022-12-12 08:34:29 +01:00
Pierre-Louis Mercereau
ecd969b345 ci: checkout repo 2022-12-12 08:34:29 +01:00
Pierre-Louis Mercereau
74c1c1bd27 ci: load: true 2022-12-12 08:34:29 +01:00
Pierre-Louis Mercereau
601259805c ci: disable build job 2022-12-12 08:34:29 +01:00
Pierre-Louis Mercereau
48f01ed8cb ci: no artifact 2022-12-12 08:34:29 +01:00
Pilou
e1a7507473 Update changesets.yaml 2022-12-12 08:34:29 +01:00
Pierre-Louis Mercereau
e5b2836215 ci: first e2e attempt 2022-12-12 08:34:29 +01:00
github-actions[bot]
8ff315e7a5 chore: update versions 2022-12-07 22:33:50 +01:00
Pierre-Louis Mercereau
f328846852 chore: bump hasura version 2022-12-07 22:25:05 +01:00
Pierre-Louis Mercereau
d3fe853b6b fix: preserve the Oauth session between the initial request and the callback 2022-12-07 22:25:05 +01:00
Pierre-Louis Mercereau
e32f1fb3f6 Merge branch 'L3K0V-sms-test-numbers' 2022-12-01 23:17:55 +01:00
Pierre-Louis Mercereau
a511353bf9 Merge branch 'sms-test-numbers' of https://github.com/L3K0V/hasura-auth into L3K0V-sms-test-numbers 2022-12-01 23:17:24 +01:00
Pierre-Louis Mercereau
951349bc34 feat: conceal sensitive error messages 2022-12-01 21:07:48 +01:00
Asen Lekov
9c25b1fedc docs(changeset): added 2022-12-01 16:11:27 +02:00
Asen Lekov
113ed2743d Merge branch 'main' into sms-test-numbers 2022-12-01 16:02:58 +02:00
Pierre-Louis Mercereau
7baab1c83f chore: update openapi specs 2022-11-30 17:00:55 +01:00
github-actions[bot]
b93ecac587 chore: update versions 2022-11-23 18:07:46 +01:00
Pierre-Louis Mercereau
e0949d72dd fix: 🐛 adjust grant 2022-11-23 16:45:03 +01:00
github-actions[bot]
1caca158ab chore: update versions 2022-11-21 18:48:18 +01:00
Pierre-Louis Mercereau
164ba34789 ci: use correct tags output 2022-11-21 18:42:53 +01:00
Pilou
d2e6f4b98b Update changesets.yaml 2022-11-21 17:40:35 +01:00
Pierre-Louis Mercereau
01bcdbb17a ci: don't skip build/publish when no changeset 2022-11-21 17:20:35 +01:00
Pierre-Louis Mercereau
42d7ce8fd9 fix: 🐛 Oauth redirection 2022-11-21 17:12:53 +01:00
Pierre-Louis Mercereau
b5ae0fe2e1 chore: optimize CI and make pipeline consistent 2022-11-21 16:54:54 +01:00
Asen Lekov
c167964a97 Merge branch 'main' into sms-test-numbers 2022-11-20 18:19:02 +02:00
Pierre-Louis Mercereau
85b3ac0e53 ci: aws config 2022-11-17 22:08:23 +01:00
Pierre-Louis Mercereau
d4f6a92097 ci: push images 2022-11-17 22:01:37 +01:00
Pierre-Louis Mercereau
7d28373c6c correct dockerfile: remove postinstall script 2022-11-17 21:44:51 +01:00
Pierre-Louis Mercereau
4ad88ce9a8 correct dockerfile 2022-11-17 21:39:17 +01:00
github-actions[bot]
73c0307bb5 chore: update versions 2022-11-17 21:34:34 +01:00
Pierre-Louis Mercereau
ef9caac8df ci: revert pacakge name 2022-11-17 21:26:52 +01:00
Pierre-Louis Mercereau
3395e2460b ci: adapt publish to changesets 2022-11-17 21:24:44 +01:00
Pierre-Louis Mercereau
0577ae8435 test: option to accept any port 2022-11-17 10:41:31 +01:00
Pierre-Louis Mercereau
8482976c29 chore: add http?(s) test and example 2022-11-17 09:39:53 +01:00
Pierre-Louis Mercereau
00a7327309 Merge branch 'main' into feat/wildcard-domains 2022-11-17 09:19:07 +01:00
Pierre-Louis Mercereau
09478c4718 chore: 🤖 changeset 2022-11-17 09:09:31 +01:00
Pierre-Louis Mercereau
949c0b5a65 fix: 🐛 wildcards separators are dots, not slashes 2022-11-17 09:04:41 +01:00
Pierre-Louis Mercereau
f44c6f6164 Merge branch 'main' into feat/wildcard-domains 2022-11-17 08:30:47 +01:00
Pierre-Louis Mercereau
fd411579ca chore: 🤖 issue link 2022-11-17 08:28:51 +01:00
Pierre-Louis Mercereau
4d16514950 chore: 🤖 changesets 2022-11-17 08:27:28 +01:00
Pierre-Louis Mercereau
0904444355 Merge branch 'main' into refactor/grant 2022-11-17 08:17:25 +01:00
Pilou
b82bfb8318 Update src/validation/fields.ts
Co-authored-by: Johan Eliasson <johan@nhost.io>
2022-11-17 08:15:09 +01:00
Pierre-Louis Mercereau
c6daab9122 chore: release notes, and minor improvements 2022-11-17 08:04:46 +01:00
Pierre-Louis Mercereau
61da856b13 ci: remove unecessary check 2022-11-17 08:04:46 +01:00
Pierre-Louis Mercereau
412ab229c2 chore: remove release-it config and update dev md 2022-11-17 08:04:46 +01:00
Pierre-Louis Mercereau
0071a55b3e ci: decommission release-it and introduce changesets 2022-11-17 08:04:46 +01:00
Pierre-Louis Mercereau
8d40d15f9f docs: improve inline documentation 2022-11-16 23:20:35 +01:00
Pierre-Louis Mercereau
5e63d8d1b4 docs: add inline comment 2022-11-16 12:59:26 +01:00
Pierre-Louis Mercereau
42a76fcba0 docs: explain AUTH_ACCESS_CONTROL_ALLOWED_REDIRECT_URLS 2022-11-16 12:47:11 +01:00
Pierre-Louis Mercereau
b1c6eb69c0 feat: 🎸 Allow wildcards and other matchings in allowed urls 2022-11-16 12:41:29 +01:00
Pierre-Louis Mercereau
c85a4d5e6b Merge branch 'main' into refactor/grant 2022-11-15 14:29:29 +01:00
Pierre-Louis Mercereau
62beaf4cd2 refactor: avoid single file in a directory 2022-11-15 14:27:12 +01:00
Pierre-Louis Mercereau
24fcc609fa chore: 🤖 adapt tests 2022-11-15 14:11:11 +01:00
Pierre-Louis Mercereau
daf3429d6d refactor: error handling, cleanup, explain 2022-11-15 14:03:24 +01:00
Pierre-Louis Mercereau
abc91fd2f4 refactor: append custom scopes 2022-11-15 12:41:44 +01:00
Pierre-Louis Mercereau
75a486fca7 refactor: fetch google oauth's refresh token 2022-11-15 12:20:28 +01:00
Pierre-Louis Mercereau
90afa95210 refactor: complete Apple Oauth with Grant 2022-11-15 10:48:11 +01:00
Pierre-Louis Mercereau
f623d341fe refactor: 💡 prepare Apple Grant 2022-11-14 19:12:45 +01:00
Pierre-Louis Mercereau
8e3199a7bb refactor: windowslive grant 2022-11-14 16:37:19 +01:00
Pierre-Louis Mercereau
f104076de2 refactor: twitter grant 2022-11-14 15:23:48 +01:00
Pierre-Louis Mercereau
6889347930 refactor: twitch grant 2022-11-14 14:46:51 +01:00
Pierre-Louis Mercereau
5dc415b06b refactor: spotify grant 2022-11-14 13:24:19 +01:00
Pierre-Louis Mercereau
93bf34ab9a refactor: strava grant 2022-11-14 13:02:20 +01:00
Pierre-Louis Mercereau
3f397cd7ed refactor: bitbucket grant 2022-11-14 12:25:42 +01:00
Pierre-Louis Mercereau
114df9b884 refactor: discord grant 2022-11-14 11:41:36 +01:00
Pierre-Louis Mercereau
ec13fea58f refactor: remove useless code 2022-11-14 11:12:30 +01:00
Pierre-Louis Mercereau
5238bf8b0e refactor: gitlab grant 2022-11-14 11:10:53 +01:00
Pierre-Louis Mercereau
1570ed4ff4 refactor: linkedin grant 2022-11-14 10:34:44 +01:00
Pierre-Louis Mercereau
6abc99f731 Merge branch 'fix-case-sensitive-redirects' 2022-11-10 16:45:40 +01:00
Linden
a94ca9a0b3 fix: match lowercase redirectTo but preserve case-insensitivity 2022-11-10 16:44:45 +01:00
Linden
1ead391321 fix: make redirectTo case-insensitive
fixes https://github.com/nhost/hasura-auth/issues/273
2022-11-10 16:44:45 +01:00
Pierre-Louis Mercereau
5034848e86 chore: also make AUTH_CLIENT_URL case insensitive 2022-11-10 16:43:58 +01:00
Pierre-Louis Mercereau
f9b51c3cb2 docs: correct changelog 2022-11-10 16:33:21 +01:00
Linden
55ad462398 fix: match lowercase redirectTo but preserve case-insensitivity 2022-11-09 13:26:01 -08:00
Linden
629ed73dc1 fix: make redirectTo case-insensitive
fixes https://github.com/nhost/hasura-auth/issues/273
2022-11-09 13:03:06 -08:00
Pierre-Louis Mercereau
54f12d8cac chore: minor stuff 2022-11-09 17:16:55 +01:00
Pierre-Louis Mercereau
a2cdb71187 refactor: remove old azuread code 2022-11-09 17:04:12 +01:00
Pierre-Louis Mercereau
80d93299cb refactor: implement Azure AD in Grant 2022-11-09 16:57:25 +01:00
Pierre-Louis Mercereau
e40a613e98 chore: changes 2022-11-09 15:44:09 +01:00
Asen Lekov
e83359a8af feat(sms): ability to set test phone numbers
Test phone numbers does not require provider to be set.
This gives a way to easily develop your apps and
sign in flow without charging or using trial credits.
The SMS template is logged with the verification code,
so developers can also preview them.
2022-11-09 09:10:37 +02:00
Asen Lekov
8221458311 fix(otp): increase OTP secret entropy to 256 bits 2022-11-08 22:28:43 +01:00
Pierre-Louis Mercereau
0d54500f16 ci: 🎡 re-order allowed roles in test snapshots 2022-11-08 22:26:42 +01:00
Pierre-Louis Mercereau
49ffdf8013 refactor: 💡 move 4 providers to Grant 2022-11-08 22:08:47 +01:00
Pierre-Louis Mercereau
8244eafccd chore: remove unused import 2022-11-07 10:46:53 +01:00
Pierre-Louis Mercereau
76337388a7 chore: provider more details about the oauth callback error 2022-11-07 10:46:53 +01:00
Pierre-Louis Mercereau
026f48f77b fix: redirect oauth errors/cancellations 2022-11-07 10:46:53 +01:00
Pierre-Louis Mercereau
b01b60bf62 refactor: fall back to error.message 2022-11-02 17:14:00 +01:00
Pierre-Louis Mercereau
b6cb7f7a77 fix: log metadata error even when no response exist 2022-11-02 17:14:00 +01:00
Pierre-Louis Mercereau
dc0bb3756e docs: ✏️ Add details about Gravatar environment variables 2022-11-02 17:09:42 +01:00
Pierre-Louis Mercereau
ebb218ed57 chore: will work even better when the test is adjusted too... 2022-10-31 08:04:38 +01:00
Pierre-Louis Mercereau
98f40cf5ab chore: typo 2022-10-31 08:04:38 +01:00
Pierre-Louis Mercereau
22ac10156c fix: return Have I Been Pwned error message 2022-10-31 08:04:38 +01:00
Pierre-Louis Mercereau
258015208f fix: tell why Hasura can't be reached 2022-10-27 14:09:58 +02:00
Pierre-Louis Mercereau
347ee4db92 feat: 🎸 Upsert roles from AUTH_USER_DEFAULT_ALLOWED_ROLES
When starting the server, all the roles defined in
`AUTH_USER_DEFAULT_ALLOWED_ROLES` are upserted into the `auth.roles`
table
2022-10-26 11:42:34 +02:00
Pierre-Louis Mercereau
9ab33cdc1b docs: ✏️ remove unued env var from the .env example 2022-10-26 11:42:34 +02:00
Pierre-Louis Mercereau
d47bffbb7a chore: 🤖 use graphql.config.js for both VS code and codegen 2022-10-26 11:42:34 +02:00
Johan Eliasson
741d324c79 update comment 2022-10-25 22:13:52 +02:00
Johan Dahlborg
e508bb3911 Update docs/configuration.md
Co-authored-by: Johan Eliasson <johan@eliasson.me>
2022-10-19 22:58:31 +02:00
Johan Dahlborg
73db3aa659 Update environment variables link 2022-10-19 22:58:31 +02:00
Nicolas Bourdin
4af169ef05 Fix Readme wrong link for webauthn 2022-10-19 22:57:33 +02:00
Pierre-Louis Mercereau
df01cbe148 chore: release v0.15.0 2022-10-18 13:55:31 +02:00
Pierre-Louis Mercereau
1fd1170342 Merge branch 'logging' 2022-10-18 13:31:05 +02:00
Pierre-Louis Mercereau
5859077e0c docs: custom claims and json columns 2022-10-18 13:29:57 +02:00
Pierre-Louis Mercereau
5a26fc953d test: should add a custom claim from a field of the metadata column 2022-10-18 13:29:57 +02:00
Pierre-Louis Mercereau
179d96ad93 fix: use the metadata column in custom claims 2022-10-18 13:29:57 +02:00
Pierre-Louis Mercereau
e0024ba91b chore: keep ? or # in obfuscated url 2022-10-17 17:06:30 +02:00
Pierre-Louis Mercereau
5a4f35f2d8 Merge branch 'secure-logging' into logging 2022-10-17 16:52:38 +02:00
Pierre-Louis Mercereau
2159f19bac chore: adjust format 2022-10-17 16:52:00 +02:00
Pierre-Louis Mercereau
93b659f11f chore: 🤖 merge branch 'main' into logging 2022-10-12 17:24:57 +02:00
Pilou
34404c23e4 Update src/utils/hasura-metadata/api.ts
Co-authored-by: Johan Eliasson <johan@nhost.io>
2022-10-12 17:23:15 +02:00
Pilou
b081676f92 Update src/utils/hasura-metadata/api.ts
Co-authored-by: Johan Eliasson <johan@nhost.io>
2022-10-12 17:23:15 +02:00
Pierre-Louis Mercereau
728f35bc6b feat: 🎸 improve metadata application and startup time 2022-10-12 17:23:15 +02:00
Pierre-Louis Mercereau
8606ed3040 chore: export-patch-replace, without real patch 2022-10-12 17:23:15 +02:00
Pierre-Louis Mercereau
6906ee797e refactor: hide headers and query params 2022-10-10 15:32:14 +02:00
Pierre-Louis Mercereau
637a48eb10 style: phrasing 2022-10-10 14:29:52 +02:00
Pierre-Louis Mercereau
40ecd77001 Merge branch 'main' into logging 2022-10-10 14:28:25 +02:00
Pierre-Louis Mercereau
f452c46899 refactor: use skip instead of ignoreRoute 2022-10-10 14:17:18 +02:00
Pierre-Louis Mercereau
8972912034 fix: 🐛 remove wrong email-template warning
 Closes: #168
2022-10-10 13:58:38 +02:00
Pierre-Louis Mercereau
7493ad2663 chore: release v0.14.0 2022-10-07 10:52:15 +02:00
Yannick Galatol
c7247ccd0b feat(provider): add azure ad provider 2022-10-07 10:50:25 +02:00
Pierre-Louis Mercereau
370baa12e9 refactor: simplify and document 2022-10-05 21:59:38 +02:00
Pierre-Louis Mercereau
c1f82c4503 fix: 🐛 capture unhandled errors 2022-10-05 16:38:25 +02:00
Pierre-Louis Mercereau
4bccab8794 feat: 🎸 Improve logging 2022-10-05 16:37:22 +02:00
Apperside
c90629e66a Add clarification
Added a clarification about how to build the json object passed to `AUTH_JWT_CUSTOM_CLAIMS` environement variable
2022-09-29 15:32:21 +02:00
Pierre-Louis Mercereau
3005ac148d chore: release v0.13.2 2022-09-28 14:45:37 +02:00
Pierre-Louis Mercereau
5939bd81c1 fix: drop authenticators inconsistency safely 2022-09-28 14:44:30 +02:00
Pierre-Louis Mercereau
cd1d83566a chore: release v0.13.1 2022-09-27 17:04:38 +02:00
Pierre-Louis Mercereau
374415289b fix: don't drop inconsitencies 2022-09-27 17:00:18 +02:00
Pierre-Louis Mercereau
4d7f19fb98 chore: release v0.13.0 2022-09-23 10:58:43 +02:00
Pierre-Louis Mercereau
bc9282bc23 refactor: destructure 2022-09-23 10:49:45 +02:00
Pierre-Louis Mercereau
8cae5dc1d5 chore: safe boolean check 2022-09-23 10:49:45 +02:00
Pierre-Louis Mercereau
598819aba2 chore: correct type 2022-09-23 10:49:45 +02:00
Pierre-Louis Mercereau
031246d627 chore: remove wrong type 2022-09-23 10:49:45 +02:00
Pierre-Louis Mercereau
0318f21898 refactor: drop inconsistencies if with old table 2022-09-23 10:49:45 +02:00
Pierre-Louis Mercereau
31543a6993 refactor: 💡 rename authenticators to security keys 2022-09-23 10:49:45 +02:00
Pierre-Louis Mercereau
cf5ff651cc Merge branch 'main' into webauthn-signup 2022-09-22 10:48:11 +02:00
Pierre-Louis Mercereau
2371fdc917 fix: 🐛 Use client hostname as RP ID 2022-09-22 09:59:37 +02:00
Pierre-Louis Mercereau
3d78c64c45 docs: add webauthn to README 2022-09-22 09:20:46 +02:00
Pierre-Louis Mercereau
b49d4f70c7 fix: 🐛 fetch profile from WorkOS oauth connection 2022-09-21 20:10:39 +02:00
Pierre-Louis Mercereau
76ea376794 docs: add webauthn signup sequence diagram 2022-09-21 15:48:35 +02:00
Pierre-Louis Mercereau
c5c7d4ca2d refactor: 💡 simplify signup payloads 2022-09-21 14:51:07 +02:00
Pierre-Louis Mercereau
a7af5ed39e docs: ✏️ update openapi specs 2022-09-21 12:30:02 +02:00
Pierre-Louis Mercereau
6e0a27695d refactor: 💡 catch errors 2022-09-21 12:22:19 +02:00
Pierre-Louis Mercereau
9236d0a6f1 refactor: allow other webauthn signup attempts 2022-09-21 10:59:42 +02:00
Pierre-Louis Mercereau
c96879e933 refactor: adjustments 2022-09-20 22:46:11 +02:00
Pierre-Louis Mercereau
9600923c11 chore: remove eslint-ignore line 2022-09-20 15:27:28 +02:00
Pierre-Louis Mercereau
8982a497df fix: webauthn signup endpoints 2022-09-20 15:24:56 +02:00
Pierre-Louis Mercereau
fac7337b5c docs: add nickname to db schema 2022-09-19 13:43:52 +02:00
Pierre-Louis Mercereau
fd04a9f7bc chore: release v0.12.0 2022-09-16 12:41:07 +02:00
Pierre-Louis Mercereau
bd3279a42e docs: remove AUTH_EMAIL_TEMPLATE_FETCH_URL from env var list 2022-09-16 12:37:26 +02:00
Pierre-Louis Mercereau
4067c03385 fix: 🐛 deprecate AUTH_EMAIL_TEMPLATE_FETCH_URL 2022-09-16 12:37:26 +02:00
Pierre-Louis Mercereau
4418bd0b28 docs: add non-empty callback 2022-09-16 12:36:57 +02:00
Pierre-Louis Mercereau
3e55b9e11c fix: 🐛 don't break reditection with redirectTo and params
 Closes: #233
2022-09-13 14:17:04 +02:00
Pierre-Louis Mercereau
7a129f6cf0 fix: 🐛 don't add custom claims when null/undefined values
and accept JSONata values that contains [] so singleton are returned as
arrays
2022-09-13 11:01:59 +02:00
Pierre-Louis Mercereau
664e5b143e test: jsonata array 2022-09-13 11:01:59 +02:00
Pierre-Louis Mercereau
8c1ce75d07 docs: ✏️ correct jsonata array notation 2022-09-13 11:01:59 +02:00
Pierre-Louis Mercereau
719fb221cd test: 💍 try empty or singleton array custom claims 2022-09-13 11:01:59 +02:00
Asen Lekov
e99ec64bca feat(sms): support for templates for the sms message (#217)
* feat(sms): support for templates for the sms message

* refactor: remove set of APP_NAME env

* test(sms): ensure not using fallback message always
2022-09-13 10:54:07 +02:00
Pierre-Louis Mercereau
fd1aacec79 chore: release v0.11.0 2022-09-08 12:14:39 +02:00
Pierre-Louis Mercereau
d1ed7eafda refactor: no AUTH_WEBAUTHN_RP_ID anywhere 2022-09-08 11:47:34 +02:00
Pierre-Louis Mercereau
c89b224349 refactor(webauthn): tests 2022-09-08 11:29:01 +02:00
Pierre-Louis Mercereau
50126b483a fix(webauthn): use the server url hostname as RP 2022-09-08 11:09:55 +02:00
Pierre-Louis Mercereau
088cde56f2 refactor: adjust test 2022-09-07 21:49:16 +02:00
Pierre-Louis Mercereau
71c858e4c6 Merge branch 'main' into webauthn-use-server-rp 2022-09-07 13:08:56 +02:00
Pierre-Louis Mercereau
b055c575bf refactor: default workos org/domain/connection 2022-09-07 12:55:51 +02:00
Pierre-Louis Mercereau
6a690601f5 refactor: validate workos params 2022-09-07 12:55:51 +02:00
Pierre-Louis Mercereau
ab359713a2 feat: workos oauth provider 2022-09-07 12:55:51 +02:00
Pierre-Louis Mercereau
ee0ad52e73 refactor: use dedicated webauthn error messages 2022-09-07 12:54:58 +02:00
Johan Eliasson
af5d2c2b94 adding profile variable (#227) 2022-09-06 21:19:40 +02:00
Pierre-Louis Mercereau
7f3944d0ad fix(webauthn): use the hostname of AUTH_SERVER_URL as a default relying party 2022-09-05 16:07:27 +02:00
Pierre-Louis Mercereau
4f166b9259 refactor: adjust after review 2022-09-05 15:11:23 +02:00
Pierre-Louis Mercereau
b95b4c458a docs: move away comment from tsdoc 2022-09-05 15:11:23 +02:00
Pierre-Louis Mercereau
a02fc72288 refactor: remove todo from TSDoc comments 2022-09-05 15:11:23 +02:00
Pierre-Louis Mercereau
a943c423d5 docs: update openapi specs 2022-09-05 15:11:23 +02:00
Pierre-Louis Mercereau
224e9902b4 feat: remove webauthn signup endpoints 2022-09-05 15:11:23 +02:00
Pierre-Louis Mercereau
f2cb098136 fix: send id+nickname when adding a security key 2022-09-05 15:11:23 +02:00
Pierre-Louis Mercereau
1d21706fb4 refactor: minor improvement 2022-09-05 15:11:23 +02:00
Pierre-Louis Mercereau
457fafd6a0 feat(webauthn): add optional authenticator nickname 2022-09-05 15:11:23 +02:00
Pierre-Louis Mercereau
b5933359ce test: adjust tests to less restrictive webauthn policy 2022-09-05 15:11:23 +02:00
Pierre-Louis Mercereau
b750784c57 docs: generate openapi specs 2022-09-05 15:11:23 +02:00
Pierre-Louis Mercereau
bdff4fec24 fix: broaden WebAuthn authenticators & algorithms 2022-09-05 15:11:23 +02:00
Pierre-Louis Mercereau
0c2a48ca63 refactor: improve typings 2022-08-31 09:04:57 +02:00
Pierre-Louis Mercereau
db8e3a2832 docs: typos 2022-07-13 21:18:50 +02:00
Pierre-Louis Mercereau
bc416fda76 docs: update PR template 2022-07-13 21:18:50 +02:00
Pierre-Louis Mercereau
d06eee5f2d docs: rephrase 2022-07-13 21:18:50 +02:00
Pierre-Louis Mercereau
6b776eb9f0 docs: rephrase 2022-07-13 21:18:50 +02:00
Pierre-Louis Mercereau
4857063b14 docs: add PR template 2022-07-13 21:18:50 +02:00
Pierre-Louis Mercereau
142f2460dc docs: add section break 2022-07-13 13:03:46 +02:00
Pierre-Louis Mercereau
1f8ee0c688 chore: update swagger specs, codegen and readme 2022-07-13 12:50:10 +02:00
Pierre-Louis Mercereau
4533b0834a chore: release v0.10.0 2022-07-13 10:01:56 +02:00
Asen Lekov
5e7b6e0e14 fix(hasura-actions): make possible to use hasura-auth APIs in hasura actions
ref #57
2022-07-13 09:38:02 +02:00
Pierre-Louis Mercereau
6daeeee1ef fix: remove comment on the auth schema
The Postgres user that runs the user should be able to run the migrations even if they are not the
owner of the auth schema.
2022-07-12 08:40:02 +02:00
Pierre-Louis Mercereau
dec3247e32 Merge branch 'main' into refactor/bump-jose 2022-07-05 22:12:21 +02:00
Pierre-Louis Mercereau
7bd478194d Merge branch 'webauthn' 2022-07-05 22:08:39 +02:00
Pierre-Louis Mercereau
e26f5b7e84 Merge branch 'webauthn' of https://github.com/dodi-smart/hasura-auth 2022-07-05 19:57:04 +02:00
Pierre-Louis Mercereau
6feeb0b1a5 refactor: simplify AUTH_WEBAUTHN_RP_ORIGINS 2022-07-05 19:48:24 +02:00
Asen Lekov
81fe46d6bf Update docs/configuration.md
Co-authored-by: Pilou <24897252+plmercereau@users.noreply.github.com>
2022-07-05 20:44:22 +03:00
Pierre-Louis Mercereau
9707c06dae refactor: cast env vars, don't show default values 2022-07-05 19:10:08 +02:00
Asen Lekov
8656add8f6 Update .env.example
Co-authored-by: Pilou <24897252+plmercereau@users.noreply.github.com>
2022-07-05 19:27:57 +03:00
Pierre-Louis Mercereau
686a85ea77 Merge branch 'main' into refactor/bump-jose 2022-07-05 17:15:22 +02:00
Pierre-Louis Mercereau
6d859a61c8 refactor: revert castStringArrayEnv logic 2022-07-05 17:04:37 +02:00
Pierre-Louis Mercereau
6f7be225d1 build: force node v16 2022-07-05 17:01:00 +02:00
Pierre-Louis Mercereau
876fda6655 ci: run tests on Node 16 2022-07-05 16:56:17 +02:00
Pierre-Louis Mercereau
fdd3d02ac5 build: upgrade Node image to v16 2022-07-05 16:52:26 +02:00
Pierre-Louis Mercereau
3a5bb8ed77 ci: add server url 2022-07-05 16:40:18 +02:00
Pierre-Louis Mercereau
575c0f8073 refactor: minor improvement 2022-07-05 16:37:50 +02:00
Pierre-Louis Mercereau
605cbcf62f refactor: bump jose to latest version, and code improvement 2022-07-05 15:28:38 +02:00
Asen Lekov
f979f1b953 docs(webauthn): wording 2022-07-05 11:41:16 +03:00
Asen Lekov
4e0c4bffdc docs(webauthn): fix typos 2022-07-05 11:40:12 +03:00
Asen Lekov
50ba9e4403 test(webauthn): fix tests and bump simplewebautn dependency 2022-07-05 11:30:13 +03:00
Pierre-Louis Mercereau
17ef26d1ad Merge branch 'Svarto-feat/change-password-with-ticket' 2022-07-05 10:07:04 +02:00
Asen Lekov
b22820b6a2 refactor(webauthn): change webauthn authentication to more restrictive approach 2022-07-04 21:54:25 +03:00
Svarto
30002238fa feat: change password with ticket 2022-07-03 20:39:14 +02:00
Svarto
067748987e Merge branch 'nhost:main' into feat/change-password-with-ticket 2022-07-03 19:48:33 +02:00
Svarto
8e14d051c4 removed superfluous rows 2022-07-03 19:40:55 +02:00
Svarto
11eba3381a nested conditionals to improve performance and avoid multiple GraphQL calls 2022-07-03 19:37:01 +02:00
Svarto
65cf1f8c10 git status 2022-07-03 19:35:16 +02:00
Svarto
9de2fbed47 nest conditions to improve performance and reduce number of GraphQL calls 2022-07-03 19:31:23 +02:00
Pilou
676d6cade5 docs: add missing env var 2022-07-01 23:29:17 +02:00
Asen Lekov
c2a1615dc6 test(webauthn): cross-platform tests 2022-07-01 21:13:56 +03:00
Asen Lekov
077bd17182 fix(webauthn): disable unauthorized add of subsequent authenticator 2022-07-01 20:37:06 +03:00
Asen Lekov
21820234c7 docs(webauthn): update decumentation 2022-07-01 17:47:14 +03:00
Asen Lekov
2d79782a88 docs(webauthn): add table to er diagram 2022-07-01 17:33:45 +03:00
Asen Lekov
02a8febe98 refactor(webauthn): better handling server start up and signup/signin 2022-07-01 17:21:42 +03:00
Asen Lekov
cce39ef820 test(webauthn): fix tests 2022-07-01 17:01:03 +03:00
Asen Lekov
3a375135a6 docs(webauthn): added sequence diagrams 2022-07-01 14:29:34 +03:00
Asen Lekov
cb9b7fbf7c chore(webauthn): update webauthn types 2022-07-01 14:29:33 +03:00
Asen Lekov
5c9625a246 fix(webauthn): syntax error because of GitHub suggestions applied 2022-07-01 14:29:33 +03:00
Asen Lekov
113a9a96e9 docs(webauthn): update environmental variables docs 2022-07-01 14:29:33 +03:00
Asen Lekov
c08167dd73 chore(webauthn): rename webauth migration and add comment on table 2022-07-01 14:29:15 +03:00
Asen Lekov
7294c87d29 Merge branch 'main' into webauthn
# Conflicts:
#	package.json
#	pnpm-lock.yaml
2022-06-30 21:08:42 +03:00
Asen Lekov
90c3b55932 Merge branch 'main' into webauthn 2022-06-30 21:04:41 +03:00
Asen Lekov
ba96e0e467 Apply suggestions from code review
Co-authored-by: Pilou <24897252+plmercereau@users.noreply.github.com>
2022-06-30 20:57:38 +03:00
Pierre-Louis Mercereau
d5ca328ceb chore: update changelog 2022-06-30 14:21:14 +02:00
Pierre-Louis Mercereau
48c812cea7 chore: release v0.9.3 2022-06-30 14:18:51 +02:00
Johan Eliasson
4d17a8763d merge 2022-06-30 13:39:12 +02:00
Johan Eliasson
534552e788 pnpm lock file 2022-06-30 13:33:33 +02:00
Johan Eliasson
15debef72c Merge branch 'main' into fix/apple-signin 2022-06-30 11:58:34 +02:00
Johan Eliasson
84d969d3cd added missing package 2022-06-30 11:39:09 +02:00
Pierre-Louis Mercereau
d6261688dd chore: rename migration file 2022-06-28 13:16:09 +02:00
Pierre-Louis Mercereau
8d821b3c37 docs: keep comments on tables 2022-06-28 13:16:09 +02:00
Pierre-Louis Mercereau
0b926e3d16 docs: complete comments 2022-06-28 13:16:09 +02:00
Pierre-Louis Mercereau
facec9771c docs: add ddl comments 2022-06-28 13:16:09 +02:00
Pierre-Louis Mercereau
aeea1d3359 feat: SQL comments on schema, tables, and colums 2022-06-28 13:16:09 +02:00
Pierre-Louis Mercereau
dc429cb5b6 test: remove null values from custom claims 2022-06-28 09:26:18 +02:00
Pierre-Louis Mercereau
35bf1863f3 fix: do not add null values to custom claims 2022-06-28 09:26:18 +02:00
Pierre-Louis Mercereau
a7072d96c9 fix: use the metadata field in custom claims 2022-06-28 09:26:06 +02:00
Asen Lekov
71cff8ac0a Merge branch 'main' into webauthn 2022-06-23 18:47:20 +03:00
Pierre-Louis Mercereau
942c0c7936 chore: release v0.9.2 2022-06-22 12:46:57 +02:00
Pierre-Louis Mercereau
57bae7fe5c docs: remove link to docs.nhost.io 2022-06-22 12:03:07 +02:00
Pierre-Louis Mercereau
91e0fbf6f3 chore: remove double dash 2022-06-22 11:41:28 +02:00
Pierre-Louis Mercereau
d8ac10a673 docs: correct stars when required 2022-06-22 11:30:07 +02:00
Pierre-Louis Mercereau
a23849a948 chore: pnpm 7 2022-06-22 11:27:06 +02:00
Pierre-Louis Mercereau
9b12c67a4e docs: docgen 2022-06-22 11:26:53 +02:00
Pierre-Louis Mercereau
65a10f623d docs: about sequence diagrams 2022-06-22 11:20:37 +02:00
Pierre-Louis Mercereau
2a30399653 docs: corrections 2022-06-22 11:20:37 +02:00
Pierre-Louis Mercereau
3ae8731a8d docs: titles and links 2022-06-22 11:20:37 +02:00
Pierre-Louis Mercereau
70e1926aeb docs: from docs.nhost.io, plus workflows et al. 2022-06-22 11:20:37 +02:00
Asen Lekov
340134de91 test(webauth): add tests 2022-06-18 16:57:43 +03:00
Asen Lekov
adb021f7c5 chore(webauthn): add env variables
ENV variables and startup checks. Also refactor a bit.
2022-06-18 16:57:16 +03:00
Asen Lekov
1717185a74 chore(webauth): add migrations 2022-06-17 21:12:24 +03:00
Asen Lekov
8a104c5b04 docs(webauthn): update openapi 2022-06-17 19:56:12 +03:00
Asen Lekov
cbe86e31b2 chore(webauthn): webauth supports now email verification 2022-06-17 19:40:03 +03:00
Asen Lekov
0ae3db9a09 chore(webauthn): improvements api and behaviour changes
now user can register multiple devices using only email
2022-06-17 18:28:08 +03:00
Asen Lekov
2e18108961 feat(auth): add initial FIDO2 Webauthn authentication method
close #153
2022-06-17 17:27:02 +03:00
Johan Eliasson
16d5b57d60 added small tests + clear ticket after usage 2022-06-17 16:25:47 +02:00
Johan Eliasson
0b0efc947d small refactor + prettier 2022-06-17 09:43:40 +02:00
Pierre-Louis Mercereau
064b15be7d fix: forbid anonymous users to change email or password, or to activate MFA 2022-06-17 09:25:48 +02:00
Svarto
355d5ca8cf added tests 2022-06-16 15:45:09 +02:00
Svarto
5653a4eecd cleaned up TypeScript 2022-06-16 13:04:16 +02:00
Pierre-Louis Mercereau
cf51d23935 chore: update openapi specs 2022-06-14 21:21:36 +02:00
Pierre-Louis Mercereau
38e9e596fd chore: update changelog 2022-06-14 18:39:58 +02:00
Pierre-Louis Mercereau
fde36e203c chore: release v0.9.1 2022-06-14 18:38:38 +02:00
Pierre-Louis Mercereau
acb9e3907f refactor: correct test, and improve naming 2022-06-13 08:53:51 +02:00
Pierre-Louis Mercereau
7d24e55d3a fix: do not actually follow redirection when redirectTo is invalid
(except for GET requests: /verify and social providers)
2022-06-13 08:53:51 +02:00
Matthew Millar
1f12a5351d fix: workaround for outlook safelinks
fixes #189
2022-06-12 21:30:10 +02:00
Johan Eliasson
d764826dd3 Update README.md 2022-06-08 20:58:11 +02:00
Pierre-Louis Mercereau
9f5cbbcd14 chore: rename EmailOptions to EmailLocals 2022-06-08 09:58:03 +02:00
Pierre-Louis Mercereau
d2235e9f54 fix: add email and newEmail variables to all email templates 2022-06-08 09:58:03 +02:00
Svarto
ca0fff0a4f added corrections according to #186 2022-06-06 11:20:44 +02:00
Svarto
73b1569af3 enabled change password to work with ticket 2022-06-06 09:18:04 +02:00
Pierre-Louis Mercereau
856640128e chore: adjust changelog 2022-06-02 15:17:39 +02:00
Pierre-Louis Mercereau
2979ca3c5b chore: release v0.9.0 2022-06-02 15:16:17 +02:00
Pierre-Louis Mercereau
e6fff04154 refactor: use E.164 2022-06-02 15:11:43 +02:00
Pierre-Louis Mercereau
de55ad787d chore: revert 2022-06-02 15:11:43 +02:00
Pierre-Louis Mercereau
a9b2359b48 refactor: don't add missing + to phone number, and correct eslint 2022-06-02 15:11:43 +02:00
Pierre-Louis Mercereau
70edaca1e4 fix: validate phone number and transform them in the international format 2022-06-02 15:11:43 +02:00
Pierre-Louis Mercereau
9a9ccae34e docs: improve comment 2022-06-01 20:15:07 +02:00
Pierre-Louis Mercereau
ad521551ab revert: add clientUrl back to emails 2022-06-01 20:15:07 +02:00
Pierre-Louis Mercereau
73c02629bb feat: allow any redirectTo when no AUTH_CLIENT_URL is set
Up to now, `AUTH_CLIENT_URL` had to be set to support transactional emails and Oauth. Now, when not
set, such feature will work as long as the `redirectTo` option is sent over by the client to Hasura
Auth. It is usefull when one wants any client to work.
2022-06-01 20:15:07 +02:00
Pierre-Louis Mercereau
299ff8da2c chore: dev-env- instead of compose- 2022-06-01 15:18:49 +02:00
Pierre-Louis Mercereau
fd836232c1 chore: correct make scripts dependencies 2022-06-01 15:18:49 +02:00
Pierre-Louis Mercereau
098730fd60 chore: simplify developers commands, including the generation of the OpenAPI specs 2022-06-01 15:18:49 +02:00
Pierre-Louis Mercereau
85d7cf19d8 manually update changelog 2022-06-01 09:09:04 +02:00
Pierre-Louis Mercereau
dddac91ac2 chore: release v0.8.1 2022-06-01 09:06:39 +02:00
Johan Eliasson
4c9641b71b patch: revert package updates 2022-06-01 08:57:16 +02:00
Johan Eliasson
627ad24f5b removed unused env var 2022-06-01 08:57:16 +02:00
Johan Eliasson
ae61717db7 update 2022-06-01 08:57:16 +02:00
Nicolas Bourdin
d2b6406237 fix readme typo 2022-05-30 08:44:43 +02:00
Pierre-Louis Mercereau
996f3f411c chore: release v0.8.0 2022-05-24 13:23:14 +02:00
Pierre-Louis Mercereau
b31b230a63 Merge branch 'main' into twilio-verify 2022-05-24 11:54:50 +02:00
Pierre-Louis Mercereau
74087dda41 fix: return standard error codes in sms passwordless sign-in 2022-05-23 15:34:46 +02:00
Pierre-Louis Mercereau
e2eac3897a fix: check locales are not more than two characters 2022-05-23 15:34:34 +02:00
Pierre-Louis Mercereau
043657441c fix: check the new email is not already in use before changing it 2022-05-23 15:18:53 +02:00
Pierre-Louis Mercereau
b0cddaa74e chore: add typings 2022-05-23 15:05:31 +02:00
Pierre-Louis Mercereau
1a36115912 reactor: simplify 2022-05-23 14:50:30 +02:00
Asen Lekov
228a24b996 refactor(token): update refresh token expiry when get session 2022-05-23 14:50:30 +02:00
Asen Lekov
0a3457a100 feat(token): add verify token endpoint
closes #83
2022-05-23 14:50:30 +02:00
Asen Lekov
7583997e45 fix(token): do not create new refresh tokens all the time
use the existing refresh token instead until expire

fix #65
2022-05-23 14:50:30 +02:00
Asen Lekov
c77e965c10 refactor(twilio): make twilio 'from' optional on startup 2022-05-11 19:58:15 +03:00
Asen Lekov
ade6087f27 refactor(twilio): check sms provider settings on startup
check if twilio configuration is valid on hasura-auth startup and refactor the code to refrect
assumed configured provider
2022-05-11 19:54:53 +03:00
Asen Lekov
363bbbceb3 Revert "Return signIn responses for passwordless"
This reverts commit 36938960e8.
2022-05-11 12:01:08 +03:00
Asen Lekov
d26259b860 Update sms.ts
On twilio sms failed delete only if user is newly created
2022-05-06 17:16:35 +03:00
Asen Lekov
36938960e8 Return signIn responses for passwordless
Closes #135
2022-04-30 15:30:41 +03:00
Asen Lekov
39cc32902e Check if user is disabled in passwordless sms
Closes #99
2022-04-30 15:26:35 +03:00
Asen Lekov
478af9fb62 Re-arrange consts 2022-04-30 14:39:54 +03:00
Asen Lekov
2ee4aa68f5 Add support for Twilio Verify
Based on the SID use messing or verify APIs
2022-04-30 14:32:11 +03:00
Pierre-Louis Mercereau
9c6d0f4ded chore: release v0.7.1 2022-04-28 14:08:15 +02:00
Pierre-Louis Mercereau
e6296fec49 chore: line break 2022-04-28 14:06:36 +02:00
Pierre-Louis Mercereau
09007c5c73 chore: send refresh token in both the hash and the query parameters 2022-04-28 14:06:36 +02:00
Pierre-Louis Mercereau
af8ea5097c feat: use query parameter instead of hash when adding the refresh token to an url 2022-04-28 14:06:36 +02:00
Pierre-Louis Mercereau
b9ea3e527a chore: release v0.7.0 2022-04-27 16:01:50 +02:00
Pierre-Louis Mercereau
5c3107e08e test: improve tests 2022-04-27 16:00:08 +02:00
Pierre-Louis Mercereau
9b88a91274 feat: use encoded redirectTo url value in email templates 2022-04-27 16:00:08 +02:00
Pierre-Louis Mercereau
3bf88d8a44 fix: don't fail when unknown options are present in the query parameters 2022-04-27 16:00:08 +02:00
Pierre-Louis Mercereau
d89561ac7f test: check the presence of errors in redirected urls 2022-04-27 16:00:08 +02:00
Pierre-Louis Mercereau
11ffb96356 chore: release v0.6.3 2022-04-21 10:06:55 +02:00
Pierre-Louis Mercereau
d1c4c9bcb1 fix: filter internal user fields in session 2022-04-21 09:52:57 +02:00
Pierre-Louis Mercereau
249a156dd5 chore: release v0.6.2 2022-04-20 20:44:18 +02:00
Pierre-Louis Mercereau
96f9f41779 Merge branch '129-hasura-auth-container-fails-to-start-after-upgrade-from-v-to-v' 2022-04-20 18:58:52 +02:00
Pierre-Louis Mercereau
62d7f597e7 chore: remove duplicate line from last merge 2022-04-20 18:55:13 +02:00
Pilou
98fc05ff6a Merge branch 'main' into 129-hasura-auth-container-fails-to-start-after-upgrade-from-v-to-v 2022-04-20 16:43:21 +02:00
Pilou
6b1b5a493d Update CHANGELOG.md 2022-04-20 09:40:48 +02:00
Pierre-Louis Mercereau
be85edb75a chore: release v0.6.1 2022-04-20 09:33:55 +02:00
Pierre-Louis Mercereau
127824c0c4 Merge branch 'fix/remove-auth-host' 2022-04-20 09:31:32 +02:00
Pierre-Louis Mercereau
577f8bfb87 chore: merge main 2022-04-20 09:28:03 +02:00
Pierre-Louis Mercereau
7f5f6b2a54 refactor: simplify Joi redirectTo validation 2022-04-20 09:23:15 +02:00
Pierre-Louis Mercereau
dac0332a04 fix: allow redirectTo option to start with any AUTH_ACCESS_CONTROL_ALLOWED_REDIRECT_URLS value 2022-04-20 09:23:15 +02:00
Pierre-Louis Mercereau
8bb351d55f perf: set AUTH_CLIENT_URL and AUTH_ACCESS_CONTROL_ALLOWED_REDIRECT_URLS to lower case 2022-04-20 09:23:15 +02:00
Pierre-Louis Mercereau
2e1819d65a fix: fall back to AUTH_CLIENT_URL if the redirectTo option is invalid 2022-04-20 09:23:15 +02:00
Pierre-Louis Mercereau
99fd7603c5 fix: correct redirectTo
Allow redirection either starting with AUTH_CLIENT_URL or being strictly included in
AUTH_ACCESS_CONTROL_ALLOWED_REDIRECT_URLS. When no redirectTo is set, falls back to AUTH_CLIENT_URL

fix #137
2022-04-20 09:23:15 +02:00
Pierre-Louis Mercereau
80b4a3984c refactor: put the metadata log info at the very top of the function 2022-04-19 20:40:51 +01:00
Pierre-Louis Mercereau
be9d6bb81f refactor: correct logger messages 2022-04-19 20:40:51 +01:00
Pierre-Louis Mercereau
bd9b3618e9 fix: run a metadata reload before and after applying hasura-auth metadata
and also make sure metadata is reloaded if the metadata script failed in the
2022-04-19 20:40:51 +01:00
Pierre-Louis Mercereau
f420693f34 chore: rephrase comment 2022-04-19 13:17:12 +01:00
Pierre-Louis Mercereau
c172c8a55b perf: improve logginh on startup 2022-04-19 13:17:12 +01:00
Pierre-Louis Mercereau
b8811d1e16 docs: write a TODO that flags how big/slow the email-templates library is
maybe the latest v9 version is better than the v7 we are using
2022-04-19 13:17:12 +01:00
Pierre-Louis Mercereau
e00c073d55 perf: improve startup with async imports 2022-04-19 13:17:12 +01:00
Pierre-Louis Mercereau
cacce97573 fix: remove the AUTH_HOST environment variable
This parameter creates confusion between internal docker/k8s networks, host network, health check
without adding a clear value
2022-04-16 19:25:37 +01:00
Pierre-Louis Mercereau
9f4ef56b8e chore: rephrase comment 2022-04-15 20:23:12 +01:00
Pierre-Louis Mercereau
1c7c18fac8 perf: improve logginh on startup 2022-04-14 21:20:44 +01:00
Pierre-Louis Mercereau
b79cc458ec docs: write a TODO that flags how big/slow the email-templates library is
maybe the latest v9 version is better than the v7 we are using
2022-04-14 21:20:19 +01:00
Pierre-Louis Mercereau
97b2caa4a1 perf: improve startup with async imports 2022-04-14 21:19:17 +01:00
Johan Eliasson
fcce09f63d apple sign in works 2022-04-14 13:21:50 +02:00
Johan Eliasson
ba8fcd18d8 Merge branch 'main' into fix/apple-signin 2022-04-14 11:05:08 +02:00
Johan Eliasson
02754a9312 Update README.md 2022-04-08 10:52:46 +02:00
Pierre-Louis Mercereau
c86ab0c216 chore: release v0.6.0 2022-04-06 10:41:51 +02:00
Pierre-Louis Mercereau
6ae1a58783 Merge branch '54-better-handling-for-email-types-and-templates' 2022-04-05 21:32:13 +02:00
Pierre-Louis Mercereau
739dc833f4 Merge branch 'main' into 54-better-handling-for-email-types-and-templates 2022-04-05 21:30:47 +02:00
Pierre-Louis Mercereau
a4ca42e780 fix: rename JWT claim x-hasura-isAnonymous to x-hasura-is-anonymous
By convention, Hasura claim names are kebab-case.

close #126
2022-04-05 21:02:38 +02:00
Pierre-Louis Mercereau
093b47f08d chore: remove duplicate EMAIL_TYPES 2022-04-05 20:59:30 +02:00
Pierre-Louis Mercereau
4d452d7d0b feat: add emailVerified, phoneNumber, phoneNumberVerified, and activeMfaType to User
See https://github.com/nhost/nhost/issues/306
2022-04-04 10:44:23 +02:00
Pierre-Louis Mercereau
6ce9d73046 chore: simplify 2022-04-04 10:31:46 +02:00
Pierre-Louis Mercereau
43161af21d chore: document, and rename the migration file to its original name when finisehd 2022-04-04 10:23:12 +02:00
Pierre-Louis Mercereau
6a0856a9e6 fix: revert 00002 migration name to previous name when migration fails because of it 2022-04-03 23:22:37 +02:00
Pierre-Louis Mercereau
4938b9fb51 docs: change docker-compose example to the same hasura version as used in the dev/test env 2022-04-03 23:20:08 +02:00
Pierre-Louis Mercereau
a2e0d2a677 fix: change default refresh token expiration to 30 days
fix #48
2022-04-01 22:05:15 +02:00
Pierre-Louis Mercereau
def75bdfd8 refactor: improve "email types" typings 2022-04-01 21:42:43 +02:00
Pilou
fdfa097f23 Update README.md 2022-04-01 08:49:05 +02:00
Pierre-Louis Mercereau
b4dfc35a71 docs: update changelog 2022-03-31 10:55:43 +02:00
Pierre-Louis Mercereau
143af704f5 chore: release v0.5.0 2022-03-31 10:51:49 +02:00
Pierre-Louis Mercereau
dc4a4126cd docs(swagger): correct anonymous signin response 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
ddba4b39f6 docs(swagger): add example to /version endpoint 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
5304e3b0fc docs: adapt swagger/openapi error codes 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
2483b78e19 refactor: deactivate AUTH_LOCALE_ALLOWED_LOCALES check 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
71b84905bb test: use status codes in tests 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
4c2150822b refactor: cosmetic changes
\
2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
6834e2d1f9 refactor: use http-status-codes for error codes and successful OK responses 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
3a29707329 refactor: adjust validations 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
a14d7a9389 feat: redirect errors to any payload with a redirectTo property 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
b7b19d919b refactor: improve registration options validation and defaults 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
6e4196dbed style: add columns to TODOs that are not related to the work in progress 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
ba1c9c0588 refactor: add joi validation 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
4f611a4143 refactor: restructure the utils/helpers files 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
d473b3e07f refactor(wip): move body/request validation schema to each route file 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
dd7b4db3e8 chore(wip): rename res.send('OK') to res.send('ok'), and add one missing sendError 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
735d71a8c8 refactor(wip): consolidate error messages 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
213e09db89 refactor(wip): streamline request validation 2022-03-31 10:13:28 +02:00
Pierre-Louis Mercereau
4f903332f4 ci: deactivate AUTH_LOCALE_ALLOWED_LOCALES in GH action 2022-03-30 16:41:21 +02:00
Pierre-Louis Mercereau
7f9e2706de ci: add default allowed locales 2022-03-30 14:34:26 +02:00
Pierre-Louis Mercereau
16df3e84b6 chore: release v0.4.3 2022-03-18 16:46:02 +01:00
Johan Eliasson
8bbc6a3c08 allow to sign up with provider without email 2022-03-18 16:42:53 +01:00
Johan Eliasson
06162b6571 special apple strategy 2022-03-18 15:30:46 +01:00
Johan Eliasson
b7acdbc0fa check correct 2022-03-18 10:35:59 +01:00
Johan Eliasson
485dc1df55 key string 2022-03-18 10:35:12 +01:00
Pierre-Louis Mercereau
666b411b6f docs: update developers instructions with pnpm 2022-03-17 18:56:56 +01:00
Johan Eliasson
e2d34e0ecd wip 2022-03-17 18:52:23 +01:00
Johan Eliasson
ebb19f8cea fix: root field typo (#117) 2022-03-17 09:08:10 +01:00
Johan Eliasson
9a140056e8 chore: release v0.4.2 2022-03-15 16:54:49 +01:00
Johan Eliasson
aab9637586 fix: check if photo item exists (#115) 2022-03-15 16:54:29 +01:00
Johan Eliasson
94511cecfc chore: release v0.4.1 2022-03-15 14:47:04 +01:00
Johan Eliasson
0024aa16f7 fix: 0.4.0 bugs (#114)
* fix: correct redirect url generation

* fix: run postinstall script
2022-03-15 14:29:21 +01:00
Johan Eliasson
02e75cfd93 fix: correct redirect url generation 2022-03-15 13:46:16 +01:00
Pierre-Louis Mercereau
06ec31fbac chore: release v0.4.0 2022-03-14 21:46:08 +01:00
Pierre-Louis Mercereau
09af005345 chore: bump releast-it changelog plugin version 2022-03-14 21:45:48 +01:00
Helio
fcd3e10468 test: make env variables available in tests 2022-03-14 20:10:40 +01:00
Johan Eliasson
0dcb37028e feat: error redirects (#109)
* feat: error redirects

* fixed tests

* pascal case for errors
2022-03-14 17:53:30 +01:00
Johan Eliasson
068f9c0d65 fix: provider requests signup data and redirectTo (#108)
* fix: provider requests signup data and redirectTo

* rename column from metadata to options
2022-03-14 17:15:56 +01:00
Pierre-Louis Mercereau
b573c9cc4b chore: enable pnpm post-install script
This commit is rather meant to share what I just learnt - and to make things a bit cleaner
2022-03-10 06:42:00 +01:00
Pierre-Louis Mercereau
dbfc0bef86 chore: release v0.3.2 2022-03-09 22:26:40 +01:00
Pierre-Louis Mercereau
1cd992602b fix: patch twitch Oauth provider 2022-03-09 22:25:02 +01:00
Johan Eliasson
1b3ed7cdfb fox: npm patch for docker (#106)
* include patches in Dockerifle

* patching npm package for docker
2022-03-09 21:54:07 +01:00
Johan Eliasson
815bd9a3e0 include patches in Dockerifle 2022-03-09 20:45:36 +01:00
Pierre-Louis Mercereau
2a4669286e chore: release v0.3.1 2022-03-04 19:22:56 +01:00
Pierre-Louis Mercereau
7b10e1e57d ci: use pnpm instead of yarn
docker takes locally 50% less time to build, we could expect the same result in our Github actions
2022-03-04 18:53:11 +01:00
Pierre-Louis Mercereau
ab23184e7c fix: use process.env.npm_package_version instead of import 'package.json'
it ended up in not using `src` as the root dir, hence the entrypoint was not dist/start.js but
dist/src/start.js
2022-03-04 18:13:41 +01:00
Pierre-Louis Mercereau
c09b857f5c ci: add missing types 2022-03-02 15:59:00 +01:00
Pierre-Louis Mercereau
f6c29b0e38 docs: update changelog 2022-03-02 15:17:40 +01:00
Pierre-Louis Mercereau
00665eb92a chore: release v0.3.0 2022-03-02 15:12:38 +01:00
Pierre-Louis Mercereau
f5fe85b401 docs: typo 2022-03-02 15:10:11 +01:00
Pierre-Louis Mercereau
1298c97579 chore: remove comment 2022-03-02 15:10:11 +01:00
Pierre-Louis Mercereau
aef86ca2d7 chore: typo 2022-03-02 15:10:11 +01:00
Pierre-Louis Mercereau
b6add5891f docs: correct swagger doc 2022-03-02 15:10:11 +01:00
Pierre-Louis Mercereau
249461bbce docs: add docker-compose instructions 2022-03-02 15:10:11 +01:00
Pierre-Louis Mercereau
e0d5658734 docs: complete openapi documentation
not perfect, but all the endpoints are now documented
2022-03-02 15:10:11 +01:00
Pierre-Louis Mercereau
6b92546928 feat: add openapi/swagger endpoint 2022-03-02 15:10:11 +01:00
Johan Eliasson
c4ff6d8f2e fix file name 2022-03-02 14:46:16 +01:00
Johan Eliasson
f022cb5a73 wrong dir 2022-03-02 14:25:17 +01:00
Johan Eliasson
9208abf73d fixing value typos 2022-03-02 14:25:17 +01:00
Johan Eliasson
c917188d96 added twitch as provider 2022-03-02 14:25:17 +01:00
Johan Eliasson
b5dac663d0 updated example envs 2022-03-02 14:25:17 +01:00
Pierre-Louis Mercereau
5a367d7cfb chore: release v0.2.1 2022-02-18 14:06:53 +01:00
Pierre-Louis Mercereau
6a8f1f268e refactor: bump hasura version in docker-compose 2022-02-18 14:05:52 +01:00
Pierre-Louis Mercereau
445ecb4879 refactor: rename migration file name 2022-02-18 12:57:56 +01:00
Pierre-Louis Mercereau
26fb2ffdef fix: reload metadata after applying metadata changes 2022-02-18 12:57:03 +01:00
Pilou
b257b692ad Update docker-compose-example.yaml 2022-02-07 14:36:31 +01:00
Pierre-Louis Mercereau
35623d7d11 docs: update changelog 2022-02-03 15:55:20 +01:00
Pierre-Louis Mercereau
c75dfeaaf1 chore: release v0.2.0 2022-02-03 15:07:17 +01:00
Pierre-Louis Mercereau
c00bff8283 fix: allow redirect urls in Oauth that starts with the one defined in the server
apply isValidRedirectTo in Oauth as well, and simplify its signature
2022-02-03 10:15:48 +01:00
Pierre-Louis Mercereau
3c95d18cbd ci: revert to previous build/push config 2022-02-03 09:51:19 +01:00
Pierre-Louis Mercereau
3a5b11ca0c ci: build and tag three times in order to please ECR 2022-02-03 09:29:06 +01:00
Siarhei Lipchyk
cbece99fd2 Fix ecr repo name
The full name for hasura-auth in our ECR is the following:

*****************.dkr.ecr.eu-central-1.amazonaws.com/hasura-auth
2022-02-03 08:35:30 +01:00
Pierre-Louis Mercereau
12a9800ad5 ci: push docker images to production ECR 2022-02-01 22:42:05 +01:00
Pierre-Louis Mercereau
d6f887a4d9 ci: add permissions to job 2022-02-01 20:18:31 +01:00
Pierre-Louis Mercereau
8e9b9736fd ci: push docker images to ecr 2022-02-01 19:39:54 +01:00
Pierre-Louis Mercereau
27b3888302 docs: add a docker-compose example 2022-02-01 10:37:35 +01:00
Pierre-Louis Mercereau
b94cdf2097 feat: simplify email templates context
Email templates can now use the `${link}` context value that represents the url the email points to
e.g. email confirmation url

close #64
2022-02-01 10:03:56 +01:00
Pierre-Louis Mercereau
5c6dbf503f fix: remove email-templates endpoint
hasura-auth is supposed to run on a stateless container, so email templates written into the local
server filesystem would not be persisted

BREAKING CHANGE: deactivate the `/email-templates` endpoint

fix #75
2022-01-31 18:35:22 +01:00
Pierre-Louis Mercereau
2458651a41 feat: implement remote email templates with AUTH_EMAIL_TEMPLATE_FETCH_URL 2022-01-31 18:35:22 +01:00
Pierre-Louis Mercereau
bca5b63af9 Merge branch 'fix-allower-roles-env-name' into main 2022-01-27 10:32:12 +01:00
Pierre-Louis Mercereau
5504c6c2ba Merge branch 'fix-allower-roles-env-name' of https://github.com/nhost/hasura-auth into fix-allower-roles-env-name 2022-01-27 10:21:44 +01:00
Pierre-Louis Mercereau
16c50d01b7 refactor: remove references to the ALLOWED_USER_ROLES unused environment variable 2022-01-27 10:21:35 +01:00
Pierre-Louis Mercereau
db25b319b1 ci: don't build/publish docker image when on a pull request 2022-01-27 10:14:57 +01:00
Pilou
70d656671b Merge branch 'main' into fix-allower-roles-env-name 2022-01-27 10:00:07 +01:00
Pierre-Louis Mercereau
e710986232 refactor: rename custom user field to metadata 2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
6c8f81fb1b docs: improve lisibility of the main graphql/jsonata mechanism 2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
0e859057e6 refactor: ignore invalid custom JWT configuration, but raise a server warning 2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
ba9d829e34 test: parsable custom jwt config, but not an object 2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
b6390fc5e2 refactor: warn when AUTH_JWT_CUSTOM_CLAIMS cannot be parsed 2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
671adb560d refactor: remove useless line 2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
53a286a74f feat: use array custom JWT claims
use jsonata to evaluate data of the generated query of custom claims
2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
353010308a test: avoid open handle 2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
a5b5cf474d refactor: remove console.log 2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
8761d442c5 refactor: move the env check to the right place so there is no circular race between ENV and logger 2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
01c0207fd1 feat: custom claims
Introduces a `AUTH_JWT_CUSTOM_CLAIMS`. Attaches custom `x-hasura-` JWT claims in querying data
related to the current user e.g. user.organisation.id. `AUTH_USER_SESSION_VARIABLE_FIELDS` is an
equivalent and is deprecated.

closes #49
2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
a8550d7798 refactor: code cleanup 2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
ee43fe374f feat: custom json object user property
option on registration to add a 'custom' JSON object property to the auth.users table

closes #31
2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
b997dc880f refactor: extend metadata operations 2022-01-27 09:27:30 +01:00
Pierre-Louis Mercereau
e99535cacc refactor: remove references to the ALLOWED_USER_ROLES unused environment variable 2022-01-26 14:14:46 +01:00
Pierre-Louis Mercereau
a595941332 fix(metadata): show column values when the column name is the same as the graphql field name
Workaround of a bug in Hasura: https://github.com/hasura/graphql-engine/issues/8020

fix #76
2022-01-24 09:55:46 +01:00
Pierre-Louis Mercereau
aef2cb8630 refactor: revert optional locale on endpoints when the user already exists
so we always use the user locale instead (unless set to NULL in the DB -> default server locale)
2022-01-24 09:15:05 +01:00
Pierre-Louis Mercereau
3ec9c763f1 fix(passwordless): don't send passwordless email when the user is disabled 2022-01-24 09:15:05 +01:00
Pierre-Louis Mercereau
6a70c103df fix(email-templates): fallback to the default template when the requested template doesn't exist 2022-01-24 09:15:05 +01:00
Pierre-Louis Mercereau
31d4a89d58 fix(email-templates): use the locale given as an option, then the existing user locale, then default 2022-01-24 09:15:05 +01:00
Pierre-Louis Mercereau
294073d76a chore: use official postgres image
close #66
2022-01-24 08:30:20 +01:00
Pilou
aaef1971a3 ci: increase yarn network timeout
See
https://github.com/docker/build-push-action/issues/471
https://github.com/nodejs/docker-node/issues/1335
2022-01-20 12:31:08 +01:00
Pierre-Louis Mercereau
ba324c005e ci: increase timeout limit 2022-01-20 12:14:18 +01:00
Pilou
52a3da805e ci: enable multi-platform build 2022-01-20 11:51:22 +01:00
Pierre-Louis Mercereau
f41fae00e2 docs: update the guide for developers 2022-01-19 12:45:28 +01:00
Pierre-Louis Mercereau
bb7c9d1bbc docs: correct developers' guide link 2022-01-19 08:39:44 +01:00
Pierre-Louis Mercereau
8da32a54a4 docs: correct dev guide link 2022-01-19 08:30:34 +01:00
Pierre-Louis Mercereau
e991f00bd2 chore: release v0.1.0 2022-01-18 22:17:45 +01:00
Pierre-Louis Mercereau
9a425b18e8 ci: trigger release worflow only on release publication 2022-01-18 22:15:46 +01:00
Pierre-Louis Mercereau
80349c2812 chore: release v0.1.0 2022-01-18 22:02:50 +01:00
Pierre-Louis Mercereau
3317ff213b ci: fallback to publishing locally 2022-01-18 22:01:50 +01:00
nhost
540bb36bbc chore: release v0.0.3 2022-01-18 20:53:52 +00:00
Pierre-Louis Mercereau
94efc5494e Merge branch 'main' of https://github.com/nhost/hasura-auth into main 2022-01-18 21:50:25 +01:00
Pierre-Louis Mercereau
b081be9d39 Merge branch 'main' of https://github.com/nhost/hasura-auth into main 2022-01-18 21:50:18 +01:00
Pierre-Louis Mercereau
c48ad52150 Merge branch 'main' of https://github.com/nhost/hasura-auth into main 2022-01-18 21:49:51 +01:00
Pierre-Louis Mercereau
29cc800ca0 ci: try to trigger publish 2022-01-18 21:49:22 +01:00
nhost
80c1794f5f chore: release v0.0.3 2022-01-18 20:44:02 +00:00
Pierre-Louis Mercereau
94850207be ci: release first, then publish on a separate workflow when GH release is effectively published 2022-01-18 21:40:58 +01:00
nhost
8b85a158a7 chore: release v0.0.3 2022-01-18 20:08:50 +00:00
Pierre-Louis Mercereau
eadfafb3ef ci: correct dependency between workflows 2022-01-18 21:05:33 +01:00
Pierre-Louis Mercereau
d9eff08121 chore: revert to latest known tag 2022-01-18 21:02:49 +01:00
Pierre-Louis Mercereau
e2dab11743 ci: tag to latest when push on main, and cleanup 2022-01-18 20:32:52 +01:00
Pierre-Louis Mercereau
56211c4d39 ci: typo 2022-01-18 19:13:23 +01:00
Pierre-Louis Mercereau
78a7e60f98 ci: try input 2022-01-18 19:11:44 +01:00
Pierre-Louis Mercereau
68108258fd ci: add release input 2022-01-18 19:04:47 +01:00
Pierre-Louis Mercereau
5f4d2b2415 perf: reduce docker image from 477MB to 176MB 2022-01-18 16:58:49 +01:00
Pierre-Louis Mercereau
7bb4763b8c ci: deactivate release hook on build 2022-01-18 16:57:44 +01:00
Pierre-Louis Mercereau
ebe00fa824 ci: correct workflow dependency 2022-01-18 16:36:00 +01:00
Pierre-Louis Mercereau
48b85ecf08 ci: activate all the workflows and reuse them in old build workflow 2022-01-18 16:34:50 +01:00
Pierre-Louis Mercereau
6e53c1235a ci: pass secrets between workflows 2022-01-18 16:24:47 +01:00
Pierre-Louis Mercereau
963099c099 ci: install depdenencies and use correct cache 2022-01-18 16:09:40 +01:00
Pierre-Louis Mercereau
841775ea4c ci: add checkout step 2022-01-18 16:01:01 +01:00
Pierre-Louis Mercereau
f149cd3a4f ci: correct link between workflows 2022-01-18 15:56:35 +01:00
Pierre-Louis Mercereau
1c5bbb0dd0 ci: correct action version 2022-01-18 15:51:23 +01:00
Pierre-Louis Mercereau
4eb09abd01 ci: correct docker secrets 2022-01-18 15:48:53 +01:00
Pierre-Louis Mercereau
4e121d2d4b ci: remove incorrect dependency 2022-01-18 15:46:55 +01:00
Pierre-Louis Mercereau
e1a52bdb1c ci: enable workflow dispatch 2022-01-18 15:45:14 +01:00
Pierre-Louis Mercereau
761677a604 ci: improve GH actions 2022-01-18 15:43:50 +01:00
Pierre-Louis Mercereau
76ae0f5a12 ci: use cache 2022-01-18 15:17:47 +01:00
nhost
8f9bb8e96d chore: release v1.1.0 2022-01-18 14:13:47 +00:00
Pierre-Louis Mercereau
1777c106bd ci: change gh action name 2022-01-18 15:11:48 +01:00
Pierre-Louis Mercereau
71e2bb3abe build: don't use github autogenerated changelog 2022-01-18 15:10:49 +01:00
Pierre-Louis Mercereau
67265de4f2 build: remove dry-run 2022-01-18 15:10:49 +01:00
Pierre-Louis Mercereau
78bc4c85e1 build: manual github action 2022-01-18 15:10:49 +01:00
Pierre-Louis Mercereau
634d4b2d28 build: initial commit/version/release tools 2022-01-18 15:10:49 +01:00
Helio Alves
f16be31f98 Add options to reset password (#51)
* fix(user): add options to userPasswordResetSchema

endpoint `/user/password/reset` accepts `options` object, however, `userPasswordResetSchema` wasn't accepting it and throwing an error

* test(user): pass options to test 'should change password with ticket'

* test(password): add test for passing redirectTo to change password with ticket

* test: correct password-related tests

Co-authored-by: Johan Eliasson <johan@nhost.io>
Co-authored-by: Pilou <24897252+plmercereau@users.noreply.github.com>
2022-01-18 12:59:00 +01:00
Helio Alves
109695f0da feat(emails): translate email templates to french (#63)
* feat(emails): translate email templates to french

* fix(typo): fix typo

* fix(translations): change translation
2022-01-18 12:24:12 +01:00
Helio Alves
c7eb721f11 fix(user): fix user schemas (#52)
* test(email): remove redundant await

* fix(schemas): fix typo in options object

* test(email): add change email with redirect test

* test(email): add tests for email verification

* fix(test): remove duplicate code

Co-authored-by: Pilou <24897252+plmercereau@users.noreply.github.com>
2022-01-18 12:23:04 +01:00
Pilou
aaa413beb2 clean code and streamline dev/test/build pipelines (#67)
- streamline tsconfig and path alias
- bump dependencies
- remove unused code e.g. prod-paths, inexistent path aliases
- remove unused dependencies e.g. esbuild, markdown-it
- develop locally rather than in a docker wrapper
- simplify package.json scripts
- use .env variables when possible e.g. cogegen, apollo
- add a basic developer's guide
2022-01-18 11:38:00 +01:00
Johan Eliasson
0b764255e0 fix: better error message for redirectTo (#59) 2022-01-17 07:17:00 +01:00
Bazyli Brzóska
3cafdf9e20 Correct typos (#61)
* correct typo

* correct typo
2022-01-17 07:16:23 +01:00
Johan Eliasson
394d4ae5e2 fix: keep .env for dev in repo and updated hasura version to m1 supported image (#60) 2021-12-23 09:30:51 +01:00
Johan Eliasson
994af31935 fix(password): validate password on change (#58)
* Validate password on change

* fix: removed unused code
2021-12-21 11:29:04 +01:00
Johan Eliasson
c328aa71ef old password is not required for signed in users to change password (#47) 2021-12-08 09:27:56 +01:00
Nuno Pato
b4a74567bb Increase signup's ticket expires at to 30 days (#45)
* Increase signup's ticket expires at to 30 days

* Also change it in send verification email
2021-11-30 13:37:33 +01:00
Johan Eliasson
c34e55eb63 typo 2021-10-30 17:20:32 +02:00
Nuno Pato
0a1fca4126 Add scope to Facebook provider (#40) 2021-10-29 08:30:30 +02:00
Johan Eliasson
b0d04e8bf8 Hirarchical structure for env vars (#39)
* removed EMAILS_ENABLED env var. SMTP settings should always be available

* renamed TWILIO env var with SMS prefix

* updated password related env vars

* updated env vars related to user role(s)

* passwordless env vars updated

* more env var updates

* test fix and updates

* provider env vars updated
2021-10-21 20:00:25 +02:00
Johan Eliasson
cd333849f0 readme update 2021-10-20 12:15:05 +02:00
Johan Eliasson
c33924e61e added default role 2021-10-20 11:25:15 +02:00
Johan Eliasson
86f942edee removed unused env var 2021-10-20 11:21:25 +02:00
Johan Eliasson
104da12e4a Passwordless routes (#38)
* started

* test fix

* redirectTo option for emails

* bug fix

* console log

* more console log

* added env var for CI

* removed console logs

* removed console logs

* sms signin working
2021-10-16 17:44:50 +02:00
Johan Eliasson
cc30a60f7d Email cleanup (#37)
* email updates

* updated tests

* lint fix

* remove logs

* build fix
2021-10-15 15:38:15 +02:00
Johan Eliasson
932baf8b1c removed profiles + cleanup 2021-10-15 13:51:44 +02:00
Johan Eliasson
c3d4167e52 moved some fields to options object 2021-10-15 13:47:37 +02:00
Johan Eliasson
780641bf84 using options instead for sign up and sign in routes (#34)
* using options instead for sign up and sign in routes

* test update

* correct options for signup
2021-10-15 12:56:33 +02:00
Johan Eliasson
68dea05653 Misc updates (#32)
* removed support for last sent for now, can be introduced later with more tests etc

* added verify route
2021-10-14 11:33:07 +02:00
Johan Eliasson
632f6c38ee Allow and block lists (#29)
* Always apply metadata

* Added new env vars

* allow and block implemented and tests for signup

* test cleanup

* access control on signin

* optional res to email validation

* correct error handling for valid email for provider
2021-10-14 11:28:02 +02:00
Johan Eliasson
252f50300a Remove profile support (#30)
* remove profile support

* removed all profile references

* removed unused code
2021-10-05 15:12:35 +02:00
Johan Eliasson
d6838305ec Always apply metadata (#28) 2021-09-28 10:06:47 +02:00
Johan Eliasson
f51bb26490 fix: Update README.md (#27) 2021-09-28 09:30:50 +02:00
elitan
6ebfe2b134 cleanup + update provider tokens on signin 2021-09-22 11:42:29 +02:00
elitan
c3de66dedd comment update 2021-09-18 11:20:14 +02:00
elitan
6197878b80 added last seen column for users 2021-09-18 11:19:33 +02:00
elitan
c916151b71 test fixes 2021-09-18 05:55:39 +02:00
Johan Eliasson
d62afdea8b Merge pull request #20 from nhost/add-extensions-to-public
Add extensions to the public schema
2021-09-16 21:10:22 +02:00
Johan Eliasson
9397db8087 Merge branch 'main' into add-extensions-to-public 2021-09-16 21:10:15 +02:00
Johan Eliasson
85b9fd8bbd Merge pull request #21 from nhost/fix-var-name
Use correct ENV var
2021-09-16 21:08:53 +02:00
elitan
4b31f30806 lower case 2021-09-15 14:15:46 +02:00
Nuno Pato
6c2f0f570d Remove references to REGISTRATION_CUSTOM_FIELDS 2021-09-07 00:14:59 +00:00
Nuno Pato
1a2cfa71ba Remove references to REDIRECT_URL_ERROR 2021-09-07 00:06:55 +00:00
Nuno Pato
4863c05b4a Remove references to REDIRECT_URL_SUCCESS 2021-09-07 00:06:18 +00:00
Nuno Pato
3bb3ee2100 Remove references to VERIFY_EMAILS 2021-09-06 23:47:50 +00:00
Nuno Pato
1d10ac8192 Remove references to AUTO_ACTIVATE_NEW_USERS 2021-09-06 23:46:11 +00:00
Nuno Pato
6b91d04589 Remove references to JWT_ALGORITHM 2021-09-06 18:52:30 +00:00
Nuno Pato
ab41a398ec Use correct ENV var 2021-09-06 18:37:19 +00:00
elitan
a894134062 updated sign in responses for email and password 2021-09-01 07:52:10 +02:00
elitan
786220f2f9 Using new metadata API and tracking all relationships 2021-08-31 21:40:30 +02:00
elitan
386f6f1da0 login with sms 2021-08-28 17:03:14 +02:00
elitan
df71598ab6 allow and block list for email and email domains 2021-08-27 16:00:00 +02:00
elitan
c68cd71f83 package cleanup and env vars started listed in README 2021-08-19 10:46:17 +02:00
elitan
234f47899c docker build updates 2021-08-19 09:12:05 +02:00
elitan
d73153ea76 update 2021-08-18 20:34:25 +02:00
elitan
f2c7b1bf3e update 2021-08-18 20:33:55 +02:00
elitan
979a3d1da1 hasura graphql url 2021-08-18 20:32:37 +02:00
elitan
b481ea9dc6 direct link 2021-08-18 20:14:53 +02:00
elitan
c58b462e33 env vars for gh actions 2021-08-18 20:07:03 +02:00
elitan
a65696c75a Using pino for logging 2021-08-18 19:56:47 +02:00
elitan
0f237d2a8f pino logger 2021-08-18 12:57:42 +02:00
elitan
4027100063 env var names updated and test passes 2021-08-18 10:53:11 +02:00
elitan
f92401a11d using x-hasura-admin-secret as header 2021-08-17 20:06:02 +02:00
elitan
5d8989bec9 single passwordless email template 2021-08-17 09:23:14 +02:00
elitan
56d887ffb1 passwordless with code / link support for email and sms 2021-08-17 08:06:07 +02:00
Nuno Pato
281344771d Add extensions to the public schema 2021-08-16 17:53:14 +00:00
elitan
6e0eed6879 bug fix 2021-08-16 10:34:15 +02:00
elitan
dd027722ee sign in body response updates and more 2021-08-16 08:09:19 +02:00
elitan
9dfa082d12 correct validations 2021-08-11 10:53:58 +02:00
elitan
e3f363558a remove tracking of email_templates table 2021-08-11 09:54:51 +02:00
elitan
e4f89b5d88 don't save email templates in db 2021-08-11 09:51:30 +02:00
elitan
a1a4c14baf removed unused code 2021-08-10 22:51:07 +02:00
elitan
bc09758fd7 example update 2021-08-10 22:19:25 +02:00
elitan
6da3a0d9fc refresh token expires in seconds 2021-08-10 22:16:53 +02:00
elitan
9f66f4d239 provider correct redirect urls 2021-08-10 22:15:00 +02:00
elitan
8371a2c8f4 removed unused imports 2021-08-10 20:05:04 +02:00
elitan
17c6760916 moved all env vars to single file 2021-08-10 19:59:36 +02:00
elitan
26e02fb119 application env var moved 2021-08-10 19:47:05 +02:00
elitan
2477572cff don't require profiles table 2021-08-10 11:40:14 +02:00
elitan
0a1ed11c04 remove ui from dockerfiles 2021-08-10 11:23:59 +02:00
elitan
c75c21aeee updates and remove UI folder 2021-08-10 11:23:23 +02:00
elitan
67d24211c2 using seconds 2021-08-09 15:14:49 +02:00
elitan
c7fb045698 email reset test working 2021-08-06 14:17:52 +02:00
elitan
9388cbab0d set specific migration table 2021-08-06 10:41:38 +02:00
elitan
5dea03825b ui extension fix 2021-08-05 19:57:43 +02:00
elitan
f26189b27c cleanup 2021-08-05 19:30:44 +02:00
elitan
97139b684b user tests 2021-08-05 19:28:49 +02:00
Johan Eliasson
c86cef5f63 Merge pull request #18 from nhost/new-changes
First quick base version new routes
2021-08-05 12:01:07 +02:00
elitan
8907eee2ed send verification email endpoint 2021-08-05 11:51:27 +02:00
elitan
f212784e39 install first 2021-08-05 09:46:07 +02:00
elitan
43ed2b03c3 log cleanup and prod docker ui fix 2021-08-05 09:35:24 +02:00
elitan
5ef5d43cb6 correct if statement 2021-08-05 09:19:57 +02:00
elitan
48cf7aa09f logs 2021-08-05 09:14:11 +02:00
elitan
e0d6e976fe more logs 2021-08-05 09:05:42 +02:00
elitan
997c561275 clear all emails 2021-08-05 08:59:37 +02:00
elitan
517d8044e9 missing await 2021-08-05 08:56:30 +02:00
elitan
554b3d5ce3 fix 2021-08-05 08:39:44 +02:00
elitan
5439ff81c9 logs 2021-08-05 08:39:03 +02:00
elitan
bfcbf22b7b include function 2021-08-05 08:33:51 +02:00
elitan
8c31a5c6a1 wait for email to arrive? 2021-08-05 08:33:24 +02:00
elitan
66b56b0dce use faker for email/password 2021-08-05 08:19:24 +02:00
elitan
d912177ee8 more tests 2021-08-05 07:59:15 +02:00
elitan
d43bdc0d8f remove verbose logs 2021-08-05 07:39:38 +02:00
elitan
4ec7c8c7df skip linting for now 2021-08-04 23:14:45 +02:00
elitan
3ef2020a26 test fix 2021-08-04 23:07:06 +02:00
elitan
9415942a53 email verification 2021-08-04 22:49:29 +02:00
elitan
5369e9624f mfa OK 2021-08-04 22:31:49 +02:00
elitan
20b55d5fba src/ui folder removed and ignored 2021-08-04 21:29:44 +02:00
elitan
dfc8d5f51f Next.js UI 2021-08-04 21:28:03 +02:00
elitan
2c0aafac68 apply metadata in dev or on first round in prod 2021-08-04 11:23:35 +02:00
elitan
c2a83a954f removed user active for disabled, added sign in email/phone nr verifyed required env vars 2021-08-04 08:52:49 +02:00
elitan
5d69d31b16 future routes 2021-08-03 10:38:06 +02:00
elitan
4236653586 moved otp to individual routes 2021-08-03 10:35:32 +02:00
elitan
65dd8beb33 README cleanup 2021-08-03 09:49:35 +02:00
elitan
0493990e57 access token custom claims test (user,profile) 2021-08-03 09:25:15 +02:00
elitan
849d842c32 claims with strings only 2021-08-02 21:03:57 +02:00
elitan
abaf40cd04 skip profiles if not exist 2021-08-02 20:41:30 +02:00
elitan
a333c8fc74 correct parameter validation 2021-08-02 10:38:14 +02:00
elitan
7b2fee36b6 correct parameter naming 2021-08-02 10:32:27 +02:00
elitan
8a9a32ce97 header naming 2021-08-02 10:26:40 +02:00
elitan
61ead1199c header naming 2021-08-02 10:22:47 +02:00
elitan
ed986ed7ba otp in magic link email 2021-08-02 10:17:22 +02:00
elitan
1b07f11843 correct handling of otp with magic links 2021-08-02 10:13:05 +02:00
elitan
17d8a3ac4e correct deanonymize 2021-08-02 09:03:05 +02:00
elitan
b7af7d4618 docker publish 2021-08-02 08:51:57 +02:00
elitan
6e3c26d4f7 more updates 2021-08-01 20:40:08 +02:00
elitan
5797f8830b test with coverage with GHA 2021-08-01 13:58:53 +02:00
elitan
57c709ed96 all tests works locally 2021-08-01 13:56:04 +02:00
elitan
811a1054ee removed all env vars from validation 2021-08-01 12:32:00 +02:00
elitan
dadeb672c6 don't use env vars in joi validation 2021-08-01 11:39:52 +02:00
elitan
81ff2d1aaf individual server per test 2021-08-01 11:31:35 +02:00
elitan
c1a94dd21f test test 2021-08-01 11:22:37 +02:00
elitan
408ab151fd added verbose logging 2021-08-01 11:07:29 +02:00
elitan
a3c897aada remove unused minio container 2021-08-01 10:54:08 +02:00
elitan
b8213f2fdd removed logs 2021-08-01 10:52:23 +02:00
elitan
228f39da1d adding tests 2021-08-01 10:47:16 +02:00
elitan
d8e260eaa7 removed docs + modified build workflow 2021-07-30 08:13:34 +02:00
elitan
9329cd4ec3 cleanup and prettier 2021-07-30 07:53:58 +02:00
elitan
36726fef52 rotating oauth tokens working 2021-07-29 12:43:06 +02:00
elitan
76fa4ad6e3 providers working 2021-07-29 10:33:01 +02:00
elitan
7183c3f240 deanonymize working with magic link 2021-07-28 16:50:32 +02:00
elitan
3c90b55958 deanonymize working 2021-07-28 16:42:49 +02:00
elitan
ee340f8683 sign in as anonymous working 2021-07-28 14:55:18 +02:00
elitan
0250773fbc user locale updaet 2021-07-28 14:40:48 +02:00
elitan
3390f45cea email reset working 2021-07-28 14:28:42 +02:00
elitan
d823235084 password reset working 2021-07-28 10:35:03 +02:00
elitan
8456bb0eaa change password with old password working 2021-07-28 09:55:29 +02:00
elitan
4de6e2d3ac no need to get userId here 2021-07-28 09:31:46 +02:00
elitan
97c437760a get user (and profile) 2021-07-28 09:30:20 +02:00
elitan
be2212c8dd sign out working 2021-07-28 09:22:17 +02:00
elitan
bc8d790eb9 refresh token working 2021-07-28 09:14:00 +02:00
elitan
cebd3399a6 activated mfa signin route 2021-07-28 08:57:42 +02:00
elitan
a4dbc79a1a MFA working 2021-07-28 08:54:28 +02:00
elitan
b27646357d cleanup 2021-07-27 11:46:07 +02:00
elitan
0d8c7d9e55 signin updates 2021-07-27 11:45:12 +02:00
elitan
1aca6b4f5b sign up email password completed 2021-07-26 09:11:31 +02:00
elitan
129248847b new init changes 2021-07-23 16:23:34 +02:00
komninoschat
da8c954ffd fix: everything 2021-07-10 01:10:06 +00:00
Johan Eliasson
0aa0a6d1e7 Merge pull request #12 from nhost/remove-public-users-table
Move users table to auth schema + camelCase
2021-07-04 07:43:45 +02:00
elitan
ce4d289438 cleanup 2021-07-04 07:42:38 +02:00
elitan
0c67a703d4 don't copy key 2021-07-03 18:46:49 +02:00
elitan
3952718811 graphql linting 2021-07-03 18:40:46 +02:00
elitan
e9b08db88f auth / refresh token middleware updated 2021-07-03 18:38:31 +02:00
elitan
871858c753 update 2021-07-03 18:33:42 +02:00
elitan
6fc15b80e3 locale update working 2021-07-03 17:29:19 +02:00
elitan
2ea24bd44d more tests working 18 left 2021-07-03 17:09:04 +02:00
elitan
fb671f5860 update, more tests needs fixing 2021-07-03 15:02:59 +02:00
elitan
dd9c32d526 linting 2021-07-03 08:17:21 +02:00
elitan
d650a7bcca don't throw if not found 2021-07-03 08:17:16 +02:00
elitan
a03412fe87 docker compose updates 2021-07-03 08:16:58 +02:00
elitan
1276ec26ba use public schema for citext extension 2021-07-03 08:16:34 +02:00
elitan
f7b235c24f don't build dev (mount instead) 2021-07-03 08:16:10 +02:00
elitan
fdf4ad31ee format on save 2021-07-03 08:15:53 +02:00
elitan
dd00098668 missing display name 2021-07-03 07:21:40 +02:00
elitan
348cc06164 do ticket db update before sending email + linting updates 2021-07-03 07:19:35 +02:00
elitan
790c9ca9cc graphql linting 2021-07-03 07:14:40 +02:00
komninoschat
6da801eb9c feat: finish 2021-07-03 00:01:01 +00:00
komninoschat
6bf6c5770b Merge branch 'remove-public-users-table' of https://github.com/nhost/hasura-auth into refactor-validation 2021-07-02 01:33:45 +00:00
Komninos Chatzipapas
bdd45ead8e Merge pull request #16 from nhost/refactor-validation
Refactor validation, error handling
2021-06-29 09:07:19 +03:00
komninoschat
5958f67305 config: gh actions master -> main 2021-06-29 05:50:49 +00:00
komninoschat
50a19da4f7 refactor: validation, error handling 2021-06-29 05:42:53 +00:00
elitan
d0503ee0f0 more updates 2021-06-28 19:55:51 +02:00
elitan
961e806a28 table interface naming update 2021-06-28 17:35:12 +02:00
elitan
3780233d87 camelCase updates 2021-06-28 17:34:02 +02:00
elitan
8a068def25 gql update 2021-06-28 08:13:50 +02:00
elitan
6742e8da4f added codegens 2021-06-28 08:10:02 +02:00
Komninos Chatzipapas
e1aaecaecc Merge pull request #11 from nhost/rename-to-main
Rename from master to main
2021-06-27 21:50:23 +03:00
elitan
8468cc3e59 try/catch not needed 2021-06-27 19:38:28 +02:00
elitan
fd87888334 tarcking + custom table fields 2021-06-27 19:37:12 +02:00
elitan
34451f7a57 Migrations working 2021-06-27 16:47:34 +02:00
Nuno Pato
6fd920aa49 Rename from master to main 2021-06-25 15:16:43 +02:00
Komninos Chatzipapas
ea088f39ba Merge pull request #7 from nhost/add-logging
Add logging
2021-06-23 12:36:21 +03:00
komninoschat
67916eb0cd fix: add new alias to jest config 2021-06-23 09:26:55 +00:00
komninoschat
8bc01ad8cb feat: logging, test logging, start fix 2021-06-23 09:16:37 +00:00
komninoschat
5c155e86e5 Initial commit 2021-06-21 07:39:56 +00:00
5086 changed files with 625576 additions and 919364 deletions

View File

@@ -7,6 +7,8 @@ assignees: ''
---
> **Note:** Bug reports that are clearly AI-generated will not be accepted and will be closed immediately. Please write your bug report in your own words.
**Describe the bug**
A clear and concise description of what the bug is.

View File

@@ -7,6 +7,8 @@ assignees: ''
---
> **Note:** Feature requests that are clearly AI-generated will not be accepted and will be closed immediately. Please write your feature request in your own words.
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

View File

@@ -8,6 +8,8 @@
--- Delete everything below this line before submitting your PR ---
> **Note on AI-assisted contributions:** Contributions with the help of AI are permitted, but you are ultimately responsible for the quality of your submission and for ensuring it follows our contributing guidelines. **The PR description must be written in your own words and be clear and concise**. Please ensure you remove any superfluous code comments introduced by AI tools before submitting. PRs that clearly violate this rule will be closed without further review.
### PR title format
The PR title must follow the following pattern:
@@ -22,6 +24,7 @@ Where `TYPE` is:
Where `PKG` is:
- `auth`: For changes to the Nhost Auth service
- `ci`: For general changes to the build and/or CI/CD pipeline
- `cli`: For changes to the Nhost CLI
- `codegen`: For changes to the code generator
@@ -29,10 +32,11 @@ Where `PKG` is:
- `deps`: For changes to dependencies
- `docs`: For changes to the documentation
- `examples`: For changes to the examples
- `internal/lib`: For changes to Nhost's common libraries (internal)
- `mintlify-openapi`: For changes to the Mintlify OpenAPI tool
- `nhost-js`: For changes to the Nhost JavaScript SDK
- `nixops`: For changes to the NixOps
- `storage`: For changes to the Nhost Storage
- `storage`: For changes to the Nhost Storage service
Where `SUMMARY` is a short description of what the PR does.

View File

@@ -17,7 +17,7 @@ runs:
# Define valid types and packages
VALID_TYPES="feat|fix|chore"
VALID_PKGS="ci|cli|codegen|dashboard|deps|docs|examples|mintlify-openapi|nhost-js|nixops|storage"
VALID_PKGS="auth|ci|cli|codegen|dashboard|deps|docs|examples|internal\/lib|mintlify-openapi|nhost-js|nixops|storage"
# Check if title matches the pattern TYPE(PKG): SUMMARY
if [[ ! "$PR_TITLE" =~ ^(${VALID_TYPES})\((${VALID_PKGS})\):\ .+ ]]; then
@@ -31,11 +31,11 @@ runs:
echo " - chore: mark this pull request as a maintenance item"
echo ""
echo "Valid PKGs:"
echo " - ci, cli, codegen, dashboard, deps, docs, examples,"
echo " - auth, ci, cli, codegen, dashboard, deps, docs, examples,"
echo " - mintlify-openapi, nhost-js, nixops, storage"
echo ""
echo "Example: feat(cli): add new command for database migrations"
exit 1
fi
echo "✅ PR title is valid!"
echo "✅ PR title is valid!"

84
.github/workflows/auth_checks.yaml vendored Normal file
View File

@@ -0,0 +1,84 @@
---
name: "auth: check and build"
on:
pull_request_target:
paths:
- '.github/workflows/auth_checks.yaml'
- '.github/workflows/wf_check.yaml'
- '.github/workflows/wf_build_artifacts.yaml'
# common build
- 'flake.nix'
- 'flake.lock'
- 'nixops/**'
- 'build/**'
# common go
- '.golangci.yaml'
- 'go.mod'
- 'go.sum'
- 'internal/lib/**'
- 'vendor/**'
# auth
- 'services/auth/**'
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.pull_request.number) || format('push-{0}', github.sha) }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
check-permissions:
runs-on: ubuntu-latest
steps:
- run: |
echo "github.event_name: ${{ github.event_name }}"
echo "github.event.pull_request.author_association: ${{ github.event.pull_request.author_association }}"
- name: "This task will run and fail if user has no permissions and label safe_to_test isn't present"
if: "github.event_name == 'pull_request_target' && ! ( contains(github.event.pull_request.labels.*.name, 'safe_to_test') || contains(fromJson('[\"OWNER\", \"MEMBER\", \"COLLABORATOR\"]'), github.event.pull_request.author_association) )"
run: |
exit 1
tests:
uses: ./.github/workflows/wf_check.yaml
needs:
- check-permissions
with:
NAME: auth
PATH: services/auth
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
NHOST_PAT: ${{ secrets.NHOST_PAT }}
build_artifacts:
uses: ./.github/workflows/wf_build_artifacts.yaml
needs:
- check-permissions
with:
NAME: auth
PATH: services/auth
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
VERSION: 0.0.0-dev # we use a fixed version here to avoid unnecessary rebuilds
DOCKER: true
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
remove_label:
runs-on: ubuntu-latest
needs:
- check-permissions
steps:
- uses: actions-ecosystem/action-remove-labels@v1
with:
labels: |
safe_to_test
if: contains(github.event.pull_request.labels.*.name, 'safe_to_test')

60
.github/workflows/auth_wf_release.yaml vendored Normal file
View File

@@ -0,0 +1,60 @@
---
name: "auth: release"
on:
workflow_call:
inputs:
GIT_REF:
required: true
type: string
VERSION:
required: true
type: string
secrets:
AWS_ACCOUNT_ID:
required: true
NIX_CACHE_PUB_KEY:
required: true
NIX_CACHE_PRIV_KEY:
required: true
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
jobs:
build_artifacts:
uses: ./.github/workflows/wf_build_artifacts.yaml
with:
NAME: auth
PATH: services/auth
GIT_REF: ${{ inputs.GIT_REF }}
VERSION: ${{ inputs.VERSION }}
DOCKER: true
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
push-docker-hub:
uses: ./.github/workflows/wf_docker_push_image.yaml
needs:
- build_artifacts
with:
NAME: auth
PATH: services/auth
VERSION: ${{ inputs.VERSION }}
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
push-docker-ecr:
uses: ./.github/workflows/wf_docker_push_image_ecr.yaml
needs:
- build_artifacts
with:
NAME: auth
PATH: services/auth
VERSION: ${{ inputs.VERSION }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
CONTAINER_REGISTRY: ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.eu-central-1.amazonaws.com

View File

@@ -33,6 +33,20 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted project: $PROJECT, version: $VERSION"
auth:
needs: extract-project
if: needs.extract-project.outputs.project == 'auth'
uses: ./.github/workflows/auth_wf_release.yaml
with:
GIT_REF: ${{ github.sha }}
VERSION: ${{ needs.extract-project.outputs.version }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
cli:
needs: extract-project
if: needs.extract-project.outputs.project == 'cli'

View File

@@ -13,7 +13,7 @@ jobs:
strategy:
matrix:
project: [cli, dashboard, packages/nhost-js, services/storage]
project: [cli, dashboard, packages/nhost-js, services/auth, services/storage]
permissions:
id-token: write
@@ -40,7 +40,7 @@ jobs:
cd ${{ matrix.project }}
TAG_NAME=$(make release-tag-name)
VERSION=$(nix develop .\#cliff -c make changelog-next-version)
if git tag | grep -q "$TAG_NAME@$VERSION"; then
if git tag | grep -qx "$TAG_NAME@$VERSION"; then
echo "Tag $TAG_NAME@$VERSION already exists, skipping release preparation"
else
echo "Tag $TAG_NAME@$VERSION does not exist, proceeding with release preparation"

View File

@@ -1,8 +1,7 @@
---
name: "cli: check and build"
on:
# pull_request_target:
pull_request:
pull_request_target:
paths:
- '.github/workflows/cli_checks.yaml'
- '.github/workflows/wf_check.yaml'
@@ -50,7 +49,7 @@ jobs:
with:
NAME: cli
PATH: cli
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
@@ -65,7 +64,7 @@ jobs:
with:
NAME: cli
PATH: cli
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
VERSION: 0.0.0-dev # we use a fixed version here to avoid unnecessary rebuilds
DOCKER: true
secrets:
@@ -81,7 +80,7 @@ jobs:
with:
NAME: cli
PATH: cli
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}

View File

@@ -63,7 +63,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Get artifacts"
uses: actions/download-artifact@v5
uses: actions/download-artifact@v6
with:
path: ~/artifacts

View File

@@ -1,8 +1,7 @@
---
name: "codegen: check and build"
on:
# pull_request_target:
pull_request:
pull_request_target:
paths:
- '.github/workflows/wf_check.yaml'
- '.github/workflows/codegen_checks.yaml'
@@ -48,7 +47,7 @@ jobs:
with:
NAME: codegen
PATH: tools/codegen
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
@@ -62,7 +61,7 @@ jobs:
with:
NAME: codegen
PATH: tools/codegen
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
VERSION: 0.0.0-dev # we use a fixed version here to avoid unnecessary rebuilds
DOCKER: false
secrets:

View File

@@ -1,7 +1,7 @@
---
name: "dashboard: check and build"
on:
pull_request:
pull_request_target:
paths:
- '.github/workflows/wf_build_artifacts.yaml'
- '.github/workflows/wf_check.yaml'
@@ -54,7 +54,7 @@ jobs:
- check-permissions
with:
NAME: dashboard
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
ENVIRONMENT: preview
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
@@ -73,7 +73,7 @@ jobs:
with:
NAME: dashboard
PATH: dashboard
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
VERSION: 0.0.0-dev # we use a fixed version here to avoid unnecessary rebuilds
DOCKER: true
OS_MATRIX: '["blacksmith-2vcpu-ubuntu-2404"]'
@@ -91,7 +91,7 @@ jobs:
with:
NAME: dashboard
PATH: dashboard
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
@@ -107,7 +107,7 @@ jobs:
with:
NAME: dashboard
PATH: dashboard
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
NHOST_TEST_DASHBOARD_URL: ${{ needs.deploy-vercel.outputs.preview-url }}
NHOST_TEST_PROJECT_NAME: ${{ vars.NHOST_TEST_PROJECT_NAME }}
NHOST_TEST_ORGANIZATION_NAME: ${{ vars.NHOST_TEST_ORGANIZATION_NAME }}
@@ -126,8 +126,10 @@ jobs:
NHOST_TEST_USER_EMAIL: ${{ secrets.NHOST_TEST_USER_EMAIL }}
NHOST_TEST_USER_PASSWORD: ${{ secrets.NHOST_TEST_USER_PASSWORD }}
NHOST_TEST_PROJECT_ADMIN_SECRET: ${{ secrets.NHOST_TEST_PROJECT_ADMIN_SECRET }}
NHOST_TEST_FREE_USER_EMAILS: ${{ secrets.NHOST_TEST_FREE_USER_EMAILS }}
NHOST_TEST_ONBOARDING_USER: ${{ secrets.NHOST_TEST_ONBOARDING_USER }}
PLAYWRIGHT_REPORT_ENCRYPTION_KEY: ${{ secrets.PLAYWRIGHT_REPORT_ENCRYPTION_KEY }}
NHOST_TEST_STAGING_SUBDOMAIN: ${{ secrets.NHOST_TEST_STAGING_SUBDOMAIN }}
NHOST_TEST_STAGING_REGION: ${{ secrets.NHOST_TEST_STAGING_REGION }}
remove_label:
runs-on: ubuntu-latest

View File

@@ -52,12 +52,16 @@ on:
required: true
NHOST_TEST_USER_PASSWORD:
required: true
NHOST_TEST_ONBOARDING_USER:
required: true
NHOST_TEST_PROJECT_ADMIN_SECRET:
required: true
NHOST_TEST_FREE_USER_EMAILS:
required: true
PLAYWRIGHT_REPORT_ENCRYPTION_KEY:
required: true
NHOST_TEST_STAGING_SUBDOMAIN:
required: true
NHOST_TEST_STAGING_REGION:
required: true
concurrency:
group: dashboard-e2e-staging
@@ -77,7 +81,10 @@ env:
NHOST_TEST_USER_EMAIL: ${{ secrets.NHOST_TEST_USER_EMAIL }}
NHOST_TEST_USER_PASSWORD: ${{ secrets.NHOST_TEST_USER_PASSWORD }}
NHOST_TEST_PROJECT_ADMIN_SECRET: ${{ secrets.NHOST_TEST_PROJECT_ADMIN_SECRET }}
NHOST_TEST_FREE_USER_EMAILS: ${{ secrets.NHOST_TEST_FREE_USER_EMAILS }}
NHOST_TEST_ONBOARDING_USER: ${{ secrets.NHOST_TEST_ONBOARDING_USER }}
NHOST_TEST_STAGING_SUBDOMAIN: ${{ secrets.NHOST_TEST_STAGING_SUBDOMAIN }}
NHOST_TEST_STAGING_REGION: ${{ secrets.NHOST_TEST_STAGING_REGION }}
jobs:
tests:
@@ -141,7 +148,7 @@ jobs:
rm playwright-report.tar.gz
- name: Upload encrypted Playwright report
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
if: failure()
with:
name: encrypted-playwright-report-${{ github.run_id }}

View File

@@ -88,6 +88,7 @@ jobs:
- name: Bump version in source code
run: |
find cli -type f -exec sed -i 's/"nhost\/dashboard:[^"]*"/"nhost\/dashboard:${{ inputs.VERSION }}"/g' {} +
sed -i 's/nhost\/dashboard:[^)]*/nhost\/dashboard:${{ inputs.VERSION }}/g' docs/reference/cli/commands.mdx
- name: "Create Pull Request"
uses: peter-evans/create-pull-request@v7

View File

@@ -1,7 +1,7 @@
---
name: "docs: check and build"
on:
pull_request:
pull_request_target:
paths:
- '.github/workflows/wf_check.yaml'
- '.github/workflows/dashboard_checks.yaml'
@@ -27,6 +27,13 @@ on:
# nhost-js
- packages/nhost-js/**
# apis
- 'services/auth/docs/openapi.yaml'
- 'services/storage/controller/openapi.yaml'
# cli
- cli/**
push:
branches:
- main
@@ -55,7 +62,7 @@ jobs:
with:
NAME: docs
PATH: docs
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}

View File

@@ -1,8 +1,7 @@
---
name: "examples/demos: check and build"
on:
# pull_request_target:
pull_request:
pull_request_target:
paths:
- '.github/workflows/wf_check.yaml'
- '.github/workflows/examples_demos_checks.yaml'
@@ -64,7 +63,7 @@ jobs:
with:
NAME: demos
PATH: examples/demos
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
@@ -78,7 +77,7 @@ jobs:
with:
NAME: demos
PATH: examples/demos
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
VERSION: 0.0.0-dev # we use a fixed version here to avoid unnecessary rebuilds
DOCKER: false
OS_MATRIX: '["blacksmith-2vcpu-ubuntu-2404"]'

View File

@@ -1,8 +1,7 @@
---
name: "examples/guides: check and build"
on:
# pull_request_target:
pull_request:
pull_request_target:
paths:
- '.github/workflows/wf_check.yaml'
- '.github/workflows/examples_guides_checks.yaml'
@@ -64,7 +63,7 @@ jobs:
with:
NAME: guides
PATH: examples/guides
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
@@ -78,7 +77,7 @@ jobs:
with:
NAME: guides
PATH: examples/guides
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
VERSION: 0.0.0-dev # we use a fixed version here to avoid unnecessary rebuilds
DOCKER: false
OS_MATRIX: '["blacksmith-2vcpu-ubuntu-2404"]'

View File

@@ -1,8 +1,7 @@
---
name: "examples/tutorials: check and build"
on:
# pull_request_target:
pull_request:
pull_request_target:
paths:
- '.github/workflows/wf_check.yaml'
- '.github/workflows/examples_tutorials_checks.yaml'
@@ -64,7 +63,7 @@ jobs:
with:
NAME: tutorials
PATH: examples/tutorials
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
@@ -78,7 +77,7 @@ jobs:
with:
NAME: tutorials
PATH: examples/tutorials
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
VERSION: 0.0.0-dev # we use a fixed version here to avoid unnecessary rebuilds
DOCKER: false
OS_MATRIX: '["blacksmith-2vcpu-ubuntu-2404"]'

View File

@@ -1,7 +1,7 @@
---
name: "gen: AI review"
on:
pull_request:
pull_request_target:
types: [opened, reopened, ready_for_review]
issue_comment:
jobs:
@@ -16,11 +16,13 @@ jobs:
steps:
- name: PR Agent action step
id: pragent
uses: Codium-ai/pr-agent@v0.30
uses: Codium-ai/pr-agent@v0.31
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_KEY: ${{ secrets.OPENAI_API_KEY }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
config.model: ${{ vars.GEN_AI_MODEL }}
config.model_turbo: $${{ vars.GEN_AI_MODEL_TURBO }}
config.max_model_tokens: 200000
config.custom_model_max_tokens: 200000
ignore.glob: "['pnpm-lock.yaml','**/pnpm-lock.yaml', 'vendor/**','**/client_gen.go','**/models_gen.go','**/generated.go','**/*.gen.go']"

View File

@@ -26,7 +26,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -37,7 +37,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v4
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -51,4 +51,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4

View File

@@ -1,8 +1,7 @@
---
name: "nhost-js: check and build"
on:
# pull_request_target:
pull_request:
pull_request_target:
paths:
- '.github/workflows/wf_check.yaml'
- '.github/workflows/nhost-js_checks.yaml'
@@ -34,6 +33,10 @@ on:
# nhost-js
- 'packages/nhost-js/**'
# apis
- 'services/auth/docs/openapi.yaml'
- 'services/storage/controller/openapi.yaml'
push:
branches:
- main
@@ -61,7 +64,7 @@ jobs:
with:
NAME: nhost-js
PATH: packages/nhost-js
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
@@ -75,7 +78,7 @@ jobs:
with:
NAME: nhost-js
PATH: packages/nhost-js
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
VERSION: 0.0.0-dev # we use a fixed version here to avoid unnecessary rebuilds
DOCKER: false
secrets:

View File

@@ -1,8 +1,7 @@
---
name: "nixops: check and build"
on:
# pull_request_target:
pull_request:
pull_request_target:
paths:
- '.github/workflows/wf_check.yaml'
- '.github/workflows/nixops_checks.yaml'
@@ -40,7 +39,7 @@ jobs:
with:
NAME: nixops
PATH: nixops
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
@@ -54,9 +53,9 @@ jobs:
with:
NAME: nixops
PATH: nixops
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
VERSION: 0.0.0-dev # we use a fixed version here to avoid unnecessary rebuilds
DOCKER: false
DOCKER: true
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}

View File

@@ -0,0 +1,35 @@
---
name: "nixops: release"
on:
push:
branches:
- main
paths:
- 'flake.lock'
- 'nixops/project.nix'
jobs:
build_artifacts:
uses: ./.github/workflows/wf_build_artifacts.yaml
with:
NAME: nixops
PATH: nixops
GIT_REF: ${{ inputs.GIT_REF }}
VERSION: latest
DOCKER: true
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }}
NIX_CACHE_PRIV_KEY: ${{ secrets.NIX_CACHE_PRIV_KEY }}
push-docker:
uses: ./.github/workflows/wf_docker_push_image.yaml
needs:
- build_artifacts
with:
NAME: nixops
PATH: nixops
VERSION: latest
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

View File

@@ -1,8 +1,7 @@
---
name: "storage: check and build"
on:
# pull_request_target:
pull_request:
pull_request_target:
paths:
- '.github/workflows/storage_checks.yaml'
- '.github/workflows/wf_check.yaml'
@@ -18,6 +17,7 @@ on:
- '.golangci.yaml'
- 'go.mod'
- 'go.sum'
- 'internal/lib/**'
- 'vendor/**'
# storage
@@ -49,7 +49,7 @@ jobs:
with:
NAME: storage
PATH: services/storage
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
secrets:
AWS_ACCOUNT_ID: ${{ secrets.AWS_PRODUCTION_CORE_ACCOUNT_ID }}
@@ -64,7 +64,7 @@ jobs:
with:
NAME: storage
PATH: services/storage
GIT_REF: ${{ github.sha }}
GIT_REF: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
VERSION: 0.0.0-dev # we use a fixed version here to avoid unnecessary rebuilds
DOCKER: true
secrets:

View File

@@ -85,7 +85,7 @@ jobs:
zip -r result.zip result
- name: "Push artifact to artifact repository"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: ${{ inputs.NAME }}-artifact-${{ steps.vars.outputs.ARCH }}-${{ steps.vars.outputs.VERSION }}
path: ${{ inputs.PATH }}/result.zip
@@ -100,7 +100,7 @@ jobs:
if: ${{ ( inputs.DOCKER ) }}
- name: "Push docker image to artifact repository"
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v5
with:
name: ${{ inputs.NAME }}-docker-image-${{ steps.vars.outputs.ARCH }}-${{ steps.vars.outputs.VERSION }}
path: ${{ inputs.PATH }}/result

View File

@@ -44,7 +44,7 @@ jobs:
echo "VERSION=$(make get-version VER=${{ inputs.VERSION }})" >> $GITHUB_OUTPUT
- name: "Get artifacts"
uses: actions/download-artifact@v5
uses: actions/download-artifact@v6
with:
path: ~/artifacts

View File

@@ -55,7 +55,7 @@ jobs:
echo "VERSION=$(make get-version VER=${{ inputs.VERSION }})" >> $GITHUB_OUTPUT
- name: "Get artifacts"
uses: actions/download-artifact@v5
uses: actions/download-artifact@v6
with:
path: ~/artifacts

View File

@@ -7,6 +7,8 @@ linters:
settings:
funlen:
lines: 65
wsl_v5:
allow-whole-block: true
disable:
- canonicalheader
- depguard
@@ -30,6 +32,7 @@ linters:
- linters:
- funlen
- ireturn
- goconst
path: _test\.go
- linters:
- lll

View File

@@ -16,6 +16,15 @@ Contributions are made to Nhost repos via Issues and Pull Requests (PRs). A few
- We work hard to make sure issues are handled on time, but it could take a while to investigate the root cause depending on the impact. A friendly ping in the comment thread to the submitter or a contributor can help draw attention if your issue is blocking.
- If you've never contributed before, see [the first-timer's guide](https://github.com/firstcontributions/first-contributions) for resources and tips on getting started.
### AI-Assisted Contributions
We have specific policies regarding AI-assisted contributions:
- **Issues**: Bug reports and feature requests that are clearly AI-generated will not be accepted and will be closed immediately. Please write your issues in your own words to ensure they are clear, specific, and contain the necessary context.
- **Pull Requests**: Contributions with the help of AI are permitted, but you are ultimately responsible for the quality of your submission and for ensuring it follows our contributing guidelines. The PR description must be written in your own words. Additionally, please remove any superfluous code comments introduced by AI tools before submitting. PRs that clearly violate this rule will be closed without further review.
In all cases, contributors must ensure their submissions are thoughtful, well-tested, and meet the project's quality standards.
### Issues
Issues should be used to report problems with Nhost, request a new feature, or discuss potential changes before a PR is created.
@@ -24,28 +33,20 @@ If you find an Issue that addresses the problem you're having, please add your r
### Pull Requests
Please have a look at our [developers guide](https://github.com/nhost/nhost/blob/main/DEVELOPERS.md) to start coding!
PRs to our libraries are always welcome and can be a quick way to get your fix or improvement slated for the next release. In general, PRs should:
- Only fix/add the functionality in question **OR** address wide-spread whitespace/style issues, not both.
- Add unit or integration tests for fixed or changed functionality (if a test suite exists).
- Address a single concern in the least number of changed lines as possible.
- Include documentation in the repo or on our [docs site](https://docs.nhost.io).
- Be accompanied by a complete Pull Request template (loaded automatically when a PR is created).
## Monorepo Structure
For changes that address core functionality or require breaking changes (e.g., a major release), it's best to open an Issue to discuss your proposal first. This is not required but can save time creating and reviewing changes.
This repository is a monorepo that contains multiple packages and applications. The structure is as follows:
In general, we follow the ["fork-and-pull" Git workflow](https://github.com/susam/gitpr)
- `cli` - The Nhost CLI
- `dashboard` - The Nhost Dashboard
- `docs` - Documentation
- `examples` - Various example projects
- `packages/nhost-js` - The Nhost JavaScript/TypeScript SDK
- `services/auth` - Nhost Authentication service
- `services/storage` - Nhost Storage service
- `tools/codegen` - Internal code generation tool to build the SDK
- `tools/mintlify-openapi` - Internal tool to generate reference documentation for Mintlify from an OpenAPI spec.
1. Fork the repository to your own Github account
2. Clone the project to your machine
3. Create a branch locally with a succinct but descriptive name. All changes should be part of a branch and submitted as a pull request - your branches should be prefixed with one of:
- `bug/` for bug fixes
- `feat/` for features
- `chore/` for configuration changes
- `docs/` for documentation changes
4. Commit changes to the branch
5. Following any formatting and testing guidelines specific to this repo
6. Push changes to your fork
7. Open a PR in our repository and follow the PR template to review the changes efficiently.
For details about those projects and how to contribute, please refer to their respective `README.md` and `CONTRIBUTING.md` files.

View File

@@ -1,100 +0,0 @@
# Developer Guide
## Requirements
### Node.js v20 or later
### [pnpm](https://pnpm.io/) package manager
The easiest way to install `pnpm` if it's not installed on your machine yet is to use `npm`:
```sh
$ npm install -g pnpm
```
### [Nhost CLI](https://docs.nhost.io/platform/cli/local-development)
- The CLI is primarily used for running the E2E tests
- Please refer to the [installation guide](https://docs.nhost.io/platform/cli/local-development) if you have not installed it yet
## File Structure
The repository is organized as a monorepo, with the following structure (only relevant folders are shown):
```
assets/ # Assets used in the README
config/ # Configuration files for the monorepo
dashboard/ # Dashboard
docs/ # Documentation website
examples/ # Example projects
packages/ # Core packages
integrations/ # These are packages that rely on the core packages
```
## Get started
### Installation
First, clone this repository:
```sh
git clone https://github.com/nhost/nhost
```
Then, install the dependencies with `pnpm`:
```sh
$ cd nhost
$ pnpm install
```
### Development
Although package references are correctly updated on the fly for TypeScript, example projects and the dashboard won't see the changes because they are depending on the build output. To fix this, you can run packages in development mode.
Running packages in development mode from the root folder is as simple as:
```sh
$ pnpm dev
```
Our packages are linked together using [PNPM's workspace](https://pnpm.io/workspaces) feature. Next.js and Vite automatically detect changes in the dependencies and rebuild everything, so the changes will be reflected in the examples and the dashboard.
**Note:** It's possible that Next.js or Vite throw an error when you run `pnpm dev`. Restarting the process should fix it.
### Use Examples
Examples are a great way to test your changes in practice. Make sure you've `pnpm dev` running in your terminal and then run an example.
Let's follow the instructions to run [react-apollo example](https://github.com/nhost/nhost/blob/main/examples/react-apollo/README.md).
## Edit Documentation
The easier way to contribute to our documentation is to go to the `docs` folder and follow the [instructions to start local development](https://github.com/nhost/nhost/blob/main/docs/README.md):
```sh
$ cd docs
# not necessary if you've already done this step somewhere in the repository
$ pnpm install
$ pnpm start
```
## Run Test Suites
### Unit Tests
You can run the unit tests with the following command from the repository root:
```sh
$ pnpm test
```
### E2E Tests
Each package that defines end-to-end tests embeds their own Nhost configuration, that will be automatically when running the tests. As a result, you must make sure you are not running the Nhost CLI before running the tests.
You can run the e2e tests with the following command from the repository root:
```sh
$ pnpm e2e
```

16
Makefile Normal file
View File

@@ -0,0 +1,16 @@
.PHONY: envrc-install
envrc-install: ## Copy envrc.sample to all project folders
@for f in $$(find . -name "project.nix"); do \
echo "Copying envrc.sample to $$(dirname $$f)/.envrc"; \
cp ./envrc.sample $$(dirname $$f)/.envrc; \
done
.PHONY: nixops-container-env
nixops-container-env: ## Enter a NixOS container environment
docker run \
-it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ./:/build \
-w /build \
nixops:0.0.0-dev \
bash

View File

@@ -12,7 +12,7 @@
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://nhost.io/blog">Blog</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://twitter.com/nhost">Twitter</a>
<a href="https://x.com/nhost">X</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
<a href="https://nhost.io/discord">Discord</a>
<span>&nbsp;&nbsp;•&nbsp;&nbsp;</span>
@@ -33,10 +33,10 @@ Nhost consists of open source software:
- Database: [PostgreSQL](https://www.postgresql.org/)
- Instant GraphQL API: [Hasura](https://hasura.io/)
- Authentication: [Hasura Auth](https://github.com/nhost/hasura-auth/)
- Storage: [Hasura Storage](https://github.com/nhost/hasura-storage)
- Authentication: [Auth](https://github.com/nhost/nhost/tree/main/services/auth)
- Storage: [Storage](https://github.com/nhost/nhost/tree/main/services/storage)
- Serverless Functions: Node.js (JavaScript and TypeScript)
- [Nhost CLI](https://docs.nhost.io/platform/cli/local-development) for local development
- [Nhost CLI](https://github.com/nhost/nhost/tree/main/cli) for local development
## Architecture of Nhost
@@ -138,7 +138,7 @@ Here are some ways of contributing to making Nhost better:
- **[Try out Nhost](https://docs.nhost.io)**, and think of ways to make the service better. Let us know here on GitHub.
- Join our [Discord](https://discord.com/invite/9V7Qb2U) and connect with other members to share and learn from.
- Send a pull request to any of our [open source repositories](https://github.com/nhost) on Github. Check our [contribution guide](https://github.com/nhost/nhost/blob/main/CONTRIBUTING.md) and our [developers guide](https://github.com/nhost/nhost/blob/main/DEVELOPERS.md) for more details about how to contribute. We're looking forward to your contribution!
- Send a pull request to any of our [open source repositories](https://github.com/nhost) on Github. Check out our [contribution guide](https://github.com/nhost/nhost/blob/main/CONTRIBUTING.md) for more details about how to contribute. We're looking forward to your contribution!
### Contributors

View File

@@ -2,5 +2,7 @@
// $schema provides code completion hints to IDEs.
"$schema": "https://github.com/IBM/audit-ci/raw/main/docs/schema.json",
"moderate": true,
"allowlist": ["vue-template-compiler", { "id": "CVE-2025-48068", "path": "next" }]
}
"allowlist": [
"GHSA-7mvr-c777-76hp" // https://github.com/advisories/GHSA-7mvr-c777-76hp Update package once Nix side is also updated
]
}

View File

@@ -54,6 +54,11 @@ get-version: ## Return version
@echo $(VERSION)
.PHONY: develop
develop: ## Start a nix develop shell
nix develop .\#$(NAME)
.PHONY: _check-pre
_check-pre: ## Pre-checks before running nix flake check
@@ -105,6 +110,11 @@ build-docker-image: ## Build docker container for native architecture
skopeo copy --insecure-policy dir:./result docker-daemon:$(NAME):$(VERSION)
.PHONY: build-docker-image-import-bare
build-docker-image-import-bare:
skopeo copy --insecure-policy dir:./result docker-daemon:$(NAME):$(VERSION)
.PHONY: dev-env-up
dev-env-up: _dev-env-build _dev-env-up ## Starts development environment

View File

@@ -1,7 +1,108 @@
## [cli@1.34.7] - 2025-11-13
### ⚙️ Miscellaneous Tasks
- *(cli)* Bump nhost/dashboard to 2.42.0 (#3693)
## [cli@1.34.6] - 2025-11-13
### 🐛 Bug Fixes
- *(cli)* Mcp: specify items type for arrays in tools (#3687)
### ⚙️ Miscellaneous Tasks
- *(cli)* Update bindings (#3689)
## [cli@1.34.5] - 2025-11-06
### ⚙️ Miscellaneous Tasks
- *(nixops)* Bump go to 1.25.3 and nixpkgs due to CVEs (#3652)
- *(cli)* Udpate certs and schema (#3675)
- *(cli)* Bump nhost/dashboard to 2.41.0 (#3669)
# Changelog
All notable changes to this project will be documented in this file.
## [cli@1.34.4] - 2025-10-28
### 🐛 Bug Fixes
- *(cli)* Update NEXT_PUBLIC_NHOST_HASURA_MIGRATIONS_API_URL correctly (#3643)
## [cli@1.34.3] - 2025-10-27
### ⚙️ Miscellaneous Tasks
- *(cli)* Update schema (#3622)
- *(cli)* Bump nhost/dashboard to 2.40.0 (#3629)
## [cli@1.34.2] - 2025-10-20
### ⚙️ Miscellaneous Tasks
- *(cli)* Minor fix to download script when specifying version (#3602)
- *(cli)* Update schema (#3613)
## [cli@1.34.1] - 2025-10-13
### 🐛 Bug Fixes
- *(cli)* Remove references to mcp-nhost (#3575)
- *(cli)* Workaround os.Rename issues when src and dst are on different partitions (#3599)
### ⚙️ Miscellaneous Tasks
- *(auth)* Change some references to deprecated hasura-auth (#3584)
- *(docs)* Udpated README.md and CONTRIBUTING.md (#3587)
## [cli@1.34.0] - 2025-10-09
### 🚀 Features
- *(cli)* Added mcp server functionality from mcp-nhost (#3550)
- *(cli)* Mcp: move configuration to .nhost folder and integrate cloud credentials (#3555)
- *(cli)* Mcp: added support for environment variables in the configuration (#3556)
- *(cli)* MCP refactor and documentation prior to official release (#3571)
### 🐛 Bug Fixes
- *(dashboard)* Remove NODE_ENV from restricted env vars (#3573)
### ⚙️ Miscellaneous Tasks
- *(nixops)* Update nhost-cli (#3554)
- *(cli)* Bump nhost/dashboard to 2.38.4 (#3539)
## [cli@1.33.0] - 2025-10-02
### 🚀 Features
- *(cli)* Migrate from urfave/v2 to urfave/v3 (#3545)
### 🐛 Bug Fixes
- *(cli)* Disable tls on AUTH_SERVER_URL when auth uses custom port (#3549)
- *(cli)* Fix breaking change in go-getter dependency (#3551)
### ⚙️ Miscellaneous Tasks
- *(cli)* Update certs (#3552)
## [cli@1.32.2] - 2025-10-01
### ⚙️ Miscellaneous Tasks
- *(cli)* Remove hasura- prefix from auth/storage images (#3538)
## [cli@1.32.1] - 2025-09-29
### ⚙️ Miscellaneous Tasks

84
cli/CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,84 @@
# Developer Guide
## Requirements
We use nix to manage the development environment, the build process and for running tests.
### With Nix (Recommended)
Run `nix develop \#cli` to get a complete development environment.
### Without Nix
Check `project.nix` (checkDeps, buildInputs, buildNativeInputs) for manual dependency installation. Alternatively, you can run `make nixops-container-env` in the root of the repository to enter a Docker container with nix and all dependencies pre-installed (note it is a large image).
## Development Workflow
### Running Tests
**With Nix:**
```bash
make dev-env-up
make check
```
**Without Nix:**
```bash
# Start development environment
make dev-env-up
# Lint Go code
golangci-lint run ./...
# Run tests
go test -v ./...
```
### Formatting
Format code before committing:
```bash
golines -w --base-formatter=gofumpt .
```
## Building
### Local Build
Build the project (output in `./result`):
```bash
make build
```
### Docker Image
Build and import Docker image with skopeo:
```bash
make build-docker-image
```
If you run the command above inside the dockerized nixops-container-env and you get an error like:
```
FATA[0000] writing blob: io: read/write on closed pipe
```
then you need to run the following command outside of the container (needs skopeo installed on the host):
```bash
cd cli
make build-docker-image-import-bare
```
### Multi-Platform Builds
Build for multiple platforms (Darwin/Linux, ARM64/AMD64):
```bash
make build-multiplatform
```
This produces binaries for:
- darwin/arm64
- darwin/amd64
- linux/arm64
- linux/amd64

View File

@@ -12,9 +12,9 @@ It's recommended to use the Nhost CLI and the [Nhost GitHub Integration](https:/
- [Nhost Dashboard](https://github.com/nhost/nhost/tree/main/dashboard)
- [Postgres Database](https://www.postgresql.org/)
- [Hasura's GraphQL Engine](https://github.com/hasura/graphql-engine)
- [Hasura Auth](https://github.com/nhost/hasura-auth)
- [Hasura Storage](https://github.com/nhost/hasura-storage)
- [GraphQL Engine](https://github.com/hasura/graphql-engine)
- [Auth](https://github.com/nhost/nhost/main/auth)
- [Storage](https://github.com/nhost/nhost/main/storage)
- [Nhost Serverless Functions](https://github.com/nhost/functions)
- [Minio S3](https://github.com/minio/minio)
- [Mailhog](https://github.com/mailhog/MailHog)
@@ -51,11 +51,18 @@ nhost up
nhost up --ui nhost
```
## MCP Server
The Nhost cli ships with an MCP server that lets you interact with your Nhost projects through AI assistants using the Model Context Protocol. It provides secure, controlled access to your GraphQL data, project configuration, and documentation—with granular permissions that let you specify exactly which queries and mutations an LLM can execute. For development, it streamlines your workflow by enabling AI-assisted schema management, metadata changes, and migrations, while providing direct access to your GraphQL schema for intelligent query building.
You can read more about the MCP server in the [MCP Server documentation](https://docs.nhost.io/platform/cli/mcp/overview).
## Documentation
- [Get started with Nhost CLI (longer version)](https://docs.nhost.io/platform/overview/get-started-with-nhost-cli)
- [Nhost CLI](https://docs.nhost.io/platform/cli)
- [Reference](https://docs.nhost.io/reference/cli)
- [MCP Server](https://docs.nhost.io/platform/cli/mcp/overview)
## Build from Source

View File

@@ -10,7 +10,7 @@ import (
"github.com/nhost/nhost/cli/nhostclient"
"github.com/nhost/nhost/cli/nhostclient/graphql"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func sanitizeName(name string) string {
@@ -55,28 +55,28 @@ func New(
}
}
func FromCLI(cCtx *cli.Context) *CliEnv {
func FromCLI(cmd *cli.Command) *CliEnv {
cwd, err := os.Getwd()
if err != nil {
panic(err)
}
return &CliEnv{
stdout: cCtx.App.Writer,
stderr: cCtx.App.ErrWriter,
stdout: cmd.Writer,
stderr: cmd.ErrWriter,
Path: NewPathStructure(
cwd,
cCtx.String(flagRootFolder),
cCtx.String(flagDotNhostFolder),
cCtx.String(flagNhostFolder),
cmd.String(flagRootFolder),
cmd.String(flagDotNhostFolder),
cmd.String(flagNhostFolder),
),
authURL: cCtx.String(flagAuthURL),
graphqlURL: cCtx.String(flagGraphqlURL),
branch: cCtx.String(flagBranch),
projectName: sanitizeName(cCtx.String(flagProjectName)),
authURL: cmd.String(flagAuthURL),
graphqlURL: cmd.String(flagGraphqlURL),
branch: cmd.String(flagBranch),
projectName: sanitizeName(cmd.String(flagProjectName)),
nhclient: nil,
nhpublicclient: nil,
localSubdomain: cCtx.String(flagLocalSubdomain),
localSubdomain: cmd.String(flagLocalSubdomain),
}
}

View File

@@ -6,7 +6,7 @@ import (
"path/filepath"
"github.com/go-git/go-git/v5"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -53,42 +53,42 @@ func Flags() ([]cli.Flag, error) {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagAuthURL,
Usage: "Nhost auth URL",
EnvVars: []string{"NHOST_CLI_AUTH_URL"},
Sources: cli.EnvVars("NHOST_CLI_AUTH_URL"),
Value: "https://otsispdzcwxyqzbfntmj.auth.eu-central-1.nhost.run/v1",
Hidden: true,
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagGraphqlURL,
Usage: "Nhost GraphQL URL",
EnvVars: []string{"NHOST_CLI_GRAPHQL_URL"},
Sources: cli.EnvVars("NHOST_CLI_GRAPHQL_URL"),
Value: "https://otsispdzcwxyqzbfntmj.graphql.eu-central-1.nhost.run/v1",
Hidden: true,
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagBranch,
Usage: "Git branch name. If not set, it will be detected from the current git repository. This flag is used to dynamically create docker volumes for each branch. If you want to have a static volume name or if you are not using git, set this flag to a static value.", //nolint:lll
EnvVars: []string{"BRANCH"},
Sources: cli.EnvVars("BRANCH"),
Value: branch,
Hidden: false,
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagRootFolder,
Usage: "Root folder of project\n\t",
EnvVars: []string{"NHOST_ROOT_FOLDER"},
Sources: cli.EnvVars("NHOST_ROOT_FOLDER"),
Value: workingDir,
Category: "Project structure",
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagDotNhostFolder,
Usage: "Path to .nhost folder\n\t",
EnvVars: []string{"NHOST_DOT_NHOST_FOLDER"},
Sources: cli.EnvVars("NHOST_DOT_NHOST_FOLDER"),
Value: dotNhostFolder,
Category: "Project structure",
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagNhostFolder,
Usage: "Path to nhost folder\n\t",
EnvVars: []string{"NHOST_NHOST_FOLDER"},
Sources: cli.EnvVars("NHOST_NHOST_FOLDER"),
Value: nhostFolder,
Category: "Project structure",
},
@@ -96,13 +96,13 @@ func Flags() ([]cli.Flag, error) {
Name: flagProjectName,
Usage: "Project name",
Value: filepath.Base(fullWorkingDir),
EnvVars: []string{"NHOST_PROJECT_NAME"},
Sources: cli.EnvVars("NHOST_PROJECT_NAME"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagLocalSubdomain,
Usage: "Local subdomain to reach the development environment",
Value: "local",
EnvVars: []string{"NHOST_LOCAL_SUBDOMAIN"},
Sources: cli.EnvVars("NHOST_LOCAL_SUBDOMAIN"),
},
}, nil
}

View File

@@ -29,3 +29,12 @@ func (ce *CliEnv) LoadSession(
return session, nil
}
func (ce *CliEnv) Credentials() (credentials.Credentials, error) {
var creds credentials.Credentials
if err := UnmarshalFile(ce.Path.AuthFile(), &creds, json.Unmarshal); err != nil {
return credentials.Credentials{}, err
}
return creds, nil
}

View File

@@ -8,7 +8,7 @@ import (
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/nhost/cli/clienv"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandApply() *cli.Command {
@@ -22,38 +22,42 @@ func CommandApply() *cli.Command {
Name: flagSubdomain,
Usage: "Subdomain of the Nhost project to apply configuration to. Defaults to linked project",
Required: true,
EnvVars: []string{"NHOST_SUBDOMAIN"},
Sources: cli.EnvVars("NHOST_SUBDOMAIN"),
},
&cli.BoolFlag{ //nolint:exhaustruct
Name: flagYes,
Usage: "Skip confirmation",
EnvVars: []string{"NHOST_YES"},
Sources: cli.EnvVars("NHOST_YES"),
},
},
}
}
func commandApply(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandApply(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
proj, err := ce.GetAppInfo(cCtx.Context, cCtx.String(flagSubdomain))
proj, err := ce.GetAppInfo(ctx, cmd.String(flagSubdomain))
if err != nil {
return fmt.Errorf("failed to get app info: %w", err)
return cli.Exit(fmt.Sprintf("Failed to get app info: %v", err), 1)
}
ce.Infoln("Validating configuration...")
cfg, _, err := ValidateRemote(
cCtx.Context,
ctx,
ce,
proj.GetSubdomain(),
proj.GetID(),
)
if err != nil {
return err
return cli.Exit(err.Error(), 1)
}
return Apply(cCtx.Context, ce, proj.ID, cfg, cCtx.Bool(flagYes))
if err := Apply(ctx, ce, proj.ID, cfg, cmd.Bool(flagYes)); err != nil {
return cli.Exit(err.Error(), 1)
}
return nil
}
func Apply(

View File

@@ -1,6 +1,6 @@
package config
import "github.com/urfave/cli/v2"
import "github.com/urfave/cli/v3"
const flagSubdomain = "subdomain"
@@ -9,7 +9,7 @@ func Command() *cli.Command {
Name: "config",
Aliases: []string{},
Usage: "Perform config operations",
Subcommands: []*cli.Command{
Commands: []*cli.Command{
CommandDefault(),
CommandExample(),
CommandApply(),

View File

@@ -1,6 +1,7 @@
package config
import (
"context"
"fmt"
"os"
@@ -8,7 +9,7 @@ import (
"github.com/nhost/nhost/cli/project"
"github.com/nhost/nhost/cli/project/env"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandDefault() *cli.Command {
@@ -21,8 +22,8 @@ func CommandDefault() *cli.Command {
}
}
func commandDefault(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandDefault(_ context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
if err := os.MkdirAll(ce.Path.NhostFolder(), 0o755); err != nil { //nolint:mnd
return fmt.Errorf("failed to create nhost folder: %w", err)

View File

@@ -13,7 +13,7 @@ import (
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/nhost/cli/clienv"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
"github.com/wI2L/jsondiff"
)
@@ -31,13 +31,13 @@ func CommandEdit() *cli.Command {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagSubdomain,
Usage: "If specified, edit this subdomain's overlay, otherwise edit base configuation",
EnvVars: []string{"NHOST_SUBDOMAIN"},
Sources: cli.EnvVars("NHOST_SUBDOMAIN"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagEditor,
Usage: "Editor to use",
Value: "vim",
EnvVars: []string{"EDITOR"},
Sources: cli.EnvVars("EDITOR"),
},
},
}
@@ -139,11 +139,11 @@ func GenerateJSONPatch(origfilepath, newfilepath, dst string) error {
return nil
}
func edit(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func edit(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
if cCtx.String(flagSubdomain) == "" {
if err := EditFile(cCtx.Context, cCtx.String(flagEditor), ce.Path.NhostToml()); err != nil {
if cmd.String(flagSubdomain) == "" {
if err := EditFile(ctx, cmd.String(flagEditor), ce.Path.NhostToml()); err != nil {
return fmt.Errorf("failed to edit config: %w", err)
}
@@ -163,17 +163,17 @@ func edit(cCtx *cli.Context) error {
tmpfileName := filepath.Join(tmpdir, "nhost.toml")
if err := CopyConfig[model.ConfigConfig](
ce.Path.NhostToml(), tmpfileName, ce.Path.Overlay(cCtx.String(flagSubdomain)),
ce.Path.NhostToml(), tmpfileName, ce.Path.Overlay(cmd.String(flagSubdomain)),
); err != nil {
return fmt.Errorf("failed to copy config: %w", err)
}
if err := EditFile(cCtx.Context, cCtx.String(flagEditor), tmpfileName); err != nil {
if err := EditFile(ctx, cmd.String(flagEditor), tmpfileName); err != nil {
return fmt.Errorf("failed to edit config: %w", err)
}
if err := GenerateJSONPatch(
ce.Path.NhostToml(), tmpfileName, ce.Path.Overlay(cCtx.String(flagSubdomain)),
ce.Path.NhostToml(), tmpfileName, ce.Path.Overlay(cmd.String(flagSubdomain)),
); err != nil {
return fmt.Errorf("failed to generate json patch: %w", err)
}

View File

@@ -1,13 +1,14 @@
package config
import (
"context"
"fmt"
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/be/services/mimir/schema"
"github.com/nhost/nhost/cli/clienv"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandExample() *cli.Command {
@@ -22,8 +23,8 @@ func CommandExample() *cli.Command {
func ptr[T any](v T) *T { return &v }
func commandExample(cCtx *cli.Context) error { //nolint:funlen,maintidx
ce := clienv.FromCLI(cCtx)
func commandExample(_ context.Context, cmd *cli.Command) error { //nolint:funlen,maintidx
ce := clienv.FromCLI(cmd)
//nolint:mnd
cfg := model.ConfigConfig{

View File

@@ -13,7 +13,7 @@ import (
"github.com/nhost/nhost/cli/project/env"
"github.com/nhost/nhost/cli/system"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -36,21 +36,21 @@ func CommandPull() *cli.Command {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagSubdomain,
Usage: "Pull this subdomain's configuration. Defaults to linked project",
EnvVars: []string{"NHOST_SUBDOMAIN"},
Sources: cli.EnvVars("NHOST_SUBDOMAIN"),
},
&cli.BoolFlag{ //nolint:exhaustruct
Name: flagYes,
Usage: "Skip confirmation",
EnvVars: []string{"NHOST_YES"},
Sources: cli.EnvVars("NHOST_YES"),
},
},
}
}
func commandPull(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandPull(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
skipConfirmation := cCtx.Bool(flagYes)
skipConfirmation := cmd.Bool(flagYes)
if !skipConfirmation {
if err := verifyFile(ce, ce.Path.NhostToml()); err != nil {
@@ -66,12 +66,12 @@ func commandPull(cCtx *cli.Context) error {
}
}
proj, err := ce.GetAppInfo(cCtx.Context, cCtx.String(flagSubdomain))
proj, err := ce.GetAppInfo(ctx, cmd.String(flagSubdomain))
if err != nil {
return fmt.Errorf("failed to get app info: %w", err)
}
_, err = Pull(cCtx.Context, ce, proj, writeSecrets)
_, err = Pull(ctx, ce, proj, writeSecrets)
return err
}

View File

@@ -1,13 +1,14 @@
package config
import (
"context"
"fmt"
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/project/env"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandShow() *cli.Command {
@@ -21,14 +22,14 @@ func CommandShow() *cli.Command {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagSubdomain,
Usage: "Show this subdomain's rendered configuration. Defaults to base configuration",
EnvVars: []string{"NHOST_SUBDOMAIN"},
Sources: cli.EnvVars("NHOST_SUBDOMAIN"),
},
},
}
}
func commandShow(c *cli.Context) error {
ce := clienv.FromCLI(c)
func commandShow(_ context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
var secrets model.Secrets
if err := clienv.UnmarshalFile(ce.Path.Secrets(), &secrets, env.Unmarshal); err != nil {
@@ -38,7 +39,7 @@ func commandShow(c *cli.Context) error {
)
}
cfg, err := Validate(ce, c.String(flagSubdomain), secrets)
cfg, err := Validate(ce, cmd.String(flagSubdomain), secrets)
if err != nil {
return err
}

View File

@@ -13,7 +13,7 @@ import (
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/project/env"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
jsonpatch "gopkg.in/evanphx/json-patch.v5"
)
@@ -27,24 +27,24 @@ func CommandValidate() *cli.Command {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagSubdomain,
Usage: "Validate this subdomain's configuration. Defaults to linked project",
EnvVars: []string{"NHOST_SUBDOMAIN"},
Sources: cli.EnvVars("NHOST_SUBDOMAIN"),
},
},
}
}
func commandValidate(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandValidate(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
subdomain := cCtx.String(flagSubdomain)
subdomain := cmd.String(flagSubdomain)
if subdomain != "" && subdomain != "local" {
proj, err := ce.GetAppInfo(cCtx.Context, cCtx.String(flagSubdomain))
proj, err := ce.GetAppInfo(ctx, cmd.String(flagSubdomain))
if err != nil {
return fmt.Errorf("failed to get app info: %w", err)
}
_, _, err = ValidateRemote(
cCtx.Context,
ctx,
ce,
proj.GetSubdomain(),
proj.GetID(),

View File

@@ -9,7 +9,7 @@ import (
"github.com/google/uuid"
"github.com/nhost/be/services/mimir/graph"
cors "github.com/rs/cors/wrapper/gin"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -48,27 +48,27 @@ func Command() *cli.Command {
Name: enablePlaygroundFlag,
Usage: "enable graphql playground (under /v1)",
Category: "server",
EnvVars: []string{"ENABLE_PLAYGROUND"},
Sources: cli.EnvVars("ENABLE_PLAYGROUND"),
},
&cli.StringFlag{ //nolint: exhaustruct
Name: storageLocalConfigPath,
Usage: "Path to the local mimir config file",
Value: "/tmp/root/nhost/nhost.toml",
Category: "plugins",
EnvVars: []string{"STORAGE_LOCAL_CONFIG_PATH"},
Sources: cli.EnvVars("STORAGE_LOCAL_CONFIG_PATH"),
},
&cli.StringFlag{ //nolint: exhaustruct
Name: storageLocalSecretsPath,
Usage: "Path to the local mimir secrets file",
Value: "/tmp/root/.secrets",
Category: "plugins",
EnvVars: []string{"STORAGE_LOCAL_SECRETS_PATH"},
Sources: cli.EnvVars("STORAGE_LOCAL_SECRETS_PATH"),
},
&cli.StringSliceFlag{ //nolint: exhaustruct
Name: storageLocalRunServicesPath,
Usage: "Path to the local mimir run services files",
Category: "plugins",
EnvVars: []string{"STORAGE_LOCAL_RUN_SERVICES_PATH"},
Sources: cli.EnvVars("STORAGE_LOCAL_RUN_SERVICES_PATH"),
},
},
Action: serve,
@@ -103,14 +103,14 @@ func runServicesFiles(runServices ...string) map[string]string {
return m
}
func serve(cCtx *cli.Context) error {
logger := getLogger(cCtx.Bool(debugFlag), cCtx.Bool(logFormatJSONFlag))
logger.Info(cCtx.App.Name + " v" + cCtx.App.Version)
logFlags(logger, cCtx)
func serve(_ context.Context, cmd *cli.Command) error {
logger := getLogger(cmd.Bool(debugFlag), cmd.Bool(logFormatJSONFlag))
logger.Info(cmd.Root().Name + " v" + cmd.Root().Version)
logFlags(logger, cmd)
configFile := cCtx.String(storageLocalConfigPath)
secretsFile := cCtx.String(storageLocalSecretsPath)
runServices := runServicesFiles(cCtx.StringSlice(storageLocalRunServicesPath)...)
configFile := cmd.String(storageLocalConfigPath)
secretsFile := cmd.String(storageLocalSecretsPath)
runServices := runServicesFiles(cmd.StringSlice(storageLocalRunServicesPath)...)
st := NewLocal(configFile, secretsFile, runServices)
@@ -131,13 +131,13 @@ func serve(cCtx *cli.Context) error {
resolver,
dummyMiddleware,
dummyMiddleware2,
cCtx.Bool(enablePlaygroundFlag),
cCtx.App.Version,
cmd.Bool(enablePlaygroundFlag),
cmd.Root().Version,
[]graphql.FieldMiddleware{},
gin.Recovery(),
cors.Default(),
)
if err := r.Run(cCtx.String(bindFlag)); err != nil {
if err := r.Run(cmd.String(bindFlag)); err != nil {
return fmt.Errorf("failed to run gin: %w", err)
}

View File

@@ -5,7 +5,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func getLogger(debug bool, formatJSON bool) *logrus.Logger {
@@ -29,15 +29,15 @@ func getLogger(debug bool, formatJSON bool) *logrus.Logger {
return logger
}
func logFlags(logger logrus.FieldLogger, cCtx *cli.Context) {
func logFlags(logger logrus.FieldLogger, cmd *cli.Command) {
fields := logrus.Fields{}
for _, flag := range cCtx.App.Flags {
for _, flag := range cmd.Root().Flags {
name := flag.Names()[0]
fields[name] = cCtx.Generic(name)
fields[name] = cmd.Value(name)
}
for _, flag := range cCtx.Command.Flags {
for _, flag := range cmd.Flags {
name := flag.Names()[0]
if strings.Contains(name, "pass") ||
strings.Contains(name, "token") ||
@@ -47,7 +47,7 @@ func logFlags(logger logrus.FieldLogger, cCtx *cli.Context) {
continue
}
fields[name] = cCtx.Generic(name)
fields[name] = cmd.Value(name)
}
logger.WithFields(fields).Info("started with settings")

View File

@@ -1,6 +1,6 @@
package deployments
import "github.com/urfave/cli/v2"
import "github.com/urfave/cli/v3"
const flagSubdomain = "subdomain"
@@ -9,7 +9,7 @@ func commonFlags() []cli.Flag {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagSubdomain,
Usage: "Project's subdomain to operate on, defaults to linked project",
EnvVars: []string{"NHOST_SUBDOMAIN"},
Sources: cli.EnvVars("NHOST_SUBDOMAIN"),
},
}
}
@@ -19,7 +19,7 @@ func Command() *cli.Command {
Name: "deployments",
Aliases: []string{},
Usage: "Manage deployments",
Subcommands: []*cli.Command{
Commands: []*cli.Command{
CommandList(),
CommandLogs(),
CommandNew(),

View File

@@ -1,12 +1,13 @@
package deployments
import (
"context"
"fmt"
"time"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/nhostclient/graphql"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandList() *cli.Command {
@@ -77,21 +78,21 @@ func printDeployments(ce *clienv.CliEnv, deployments []*graphql.ListDeployments_
ce.Println("%s", clienv.Table(id, date, duration, status, user, ref, message))
}
func commandList(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandList(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
proj, err := ce.GetAppInfo(cCtx.Context, cCtx.String(flagSubdomain))
proj, err := ce.GetAppInfo(ctx, cmd.String(flagSubdomain))
if err != nil {
return fmt.Errorf("failed to get app info: %w", err)
}
cl, err := ce.GetNhostClient(cCtx.Context)
cl, err := ce.GetNhostClient(ctx)
if err != nil {
return fmt.Errorf("failed to get nhost client: %w", err)
}
deployments, err := cl.ListDeployments(
cCtx.Context,
ctx,
proj.ID,
)
if err != nil {

View File

@@ -8,7 +8,7 @@ import (
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/nhostclient"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -101,28 +101,28 @@ func showLogsFollow(
}
}
func commandLogs(cCtx *cli.Context) error {
deploymentID := cCtx.Args().First()
func commandLogs(ctx context.Context, cmd *cli.Command) error {
deploymentID := cmd.Args().First()
if deploymentID == "" {
return errors.New("deployment_id is required") //nolint:err113
}
ce := clienv.FromCLI(cCtx)
ce := clienv.FromCLI(cmd)
cl, err := ce.GetNhostClient(cCtx.Context)
cl, err := ce.GetNhostClient(ctx)
if err != nil {
return fmt.Errorf("failed to get nhost client: %w", err)
}
if cCtx.Bool(flagFollow) {
ctx, cancel := context.WithTimeout(cCtx.Context, cCtx.Duration(flagTimeout))
if cmd.Bool(flagFollow) {
ctxWithTimeout, cancel := context.WithTimeout(ctx, cmd.Duration(flagTimeout))
defer cancel()
if _, err := showLogsFollow(ctx, ce, cl, deploymentID); err != nil {
if _, err := showLogsFollow(ctxWithTimeout, ce, cl, deploymentID); err != nil {
return err
}
} else {
if err := showLogsSimple(cCtx.Context, ce, cl, deploymentID); err != nil {
if err := showLogsSimple(ctx, ce, cl, deploymentID); err != nil {
return err
}
}

View File

@@ -7,7 +7,7 @@ import (
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/nhostclient/graphql"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -40,7 +40,7 @@ func CommandNew() *cli.Command {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagRef,
Usage: "Git reference",
EnvVars: []string{"GITHUB_SHA"},
Sources: cli.EnvVars("GITHUB_SHA"),
Required: true,
},
&cli.StringFlag{ //nolint:exhaustruct
@@ -51,7 +51,7 @@ func CommandNew() *cli.Command {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagUser,
Usage: "Commit user name",
EnvVars: []string{"GITHUB_ACTOR"},
Sources: cli.EnvVars("GITHUB_ACTOR"),
Required: true,
},
&cli.StringFlag{ //nolint:exhaustruct
@@ -67,28 +67,28 @@ func ptr[i any](v i) *i {
return &v
}
func commandNew(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandNew(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
cl, err := ce.GetNhostClient(cCtx.Context)
cl, err := ce.GetNhostClient(ctx)
if err != nil {
return fmt.Errorf("failed to get nhost client: %w", err)
}
proj, err := ce.GetAppInfo(cCtx.Context, cCtx.String(flagSubdomain))
proj, err := ce.GetAppInfo(ctx, cmd.String(flagSubdomain))
if err != nil {
return fmt.Errorf("failed to get app info: %w", err)
}
resp, err := cl.InsertDeployment(
cCtx.Context,
ctx,
graphql.DeploymentsInsertInput{
App: nil,
AppID: ptr(proj.ID),
CommitMessage: ptr(cCtx.String(flagMessage)),
CommitSha: ptr(cCtx.String(flagRef)),
CommitUserAvatarURL: ptr(cCtx.String(flagUserAvatarURL)),
CommitUserName: ptr(cCtx.String(flagUser)),
CommitMessage: ptr(cmd.String(flagMessage)),
CommitSha: ptr(cmd.String(flagRef)),
CommitUserAvatarURL: ptr(cmd.String(flagUserAvatarURL)),
CommitUserName: ptr(cmd.String(flagUser)),
DeploymentStatus: ptr("SCHEDULED"),
},
)
@@ -98,13 +98,13 @@ func commandNew(cCtx *cli.Context) error {
ce.Println("Deployment created: %s", resp.InsertDeployment.ID)
if cCtx.Bool(flagFollow) {
if cmd.Bool(flagFollow) {
ce.Println("")
ctx, cancel := context.WithTimeout(cCtx.Context, cCtx.Duration(flagTimeout))
ctxWithTimeout, cancel := context.WithTimeout(ctx, cmd.Duration(flagTimeout))
defer cancel()
status, err := showLogsFollow(ctx, ce, cl, resp.InsertDeployment.ID)
status, err := showLogsFollow(ctxWithTimeout, ce, cl, resp.InsertDeployment.ID)
if err != nil {
return fmt.Errorf("error streaming logs: %w", err)
}

View File

@@ -15,7 +15,7 @@ import (
"github.com/nhost/nhost/cli/cmd/software"
"github.com/nhost/nhost/cli/dockercompose"
"github.com/nhost/nhost/cli/nhostclient/graphql"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -34,19 +34,19 @@ func CommandCloud() *cli.Command {
Name: flagHTTPPort,
Usage: "HTTP port to listen on",
Value: defaultHTTPPort,
EnvVars: []string{"NHOST_HTTP_PORT"},
Sources: cli.EnvVars("NHOST_HTTP_PORT"),
},
&cli.BoolFlag{ //nolint:exhaustruct
Name: flagDisableTLS,
Usage: "Disable TLS",
Value: false,
EnvVars: []string{"NHOST_DISABLE_TLS"},
Sources: cli.EnvVars("NHOST_DISABLE_TLS"),
},
&cli.BoolFlag{ //nolint:exhaustruct
Name: flagApplySeeds,
Usage: "Apply seeds. If the .nhost folder does not exist, seeds will be applied regardless of this flag",
Value: false,
EnvVars: []string{"NHOST_APPLY_SEEDS"},
Sources: cli.EnvVars("NHOST_APPLY_SEEDS"),
},
&cli.UintFlag{ //nolint:exhaustruct
Name: flagsHasuraConsolePort,
@@ -56,42 +56,42 @@ func CommandCloud() *cli.Command {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagDashboardVersion,
Usage: "Dashboard version to use",
Value: "nhost/dashboard:2.33.0",
EnvVars: []string{"NHOST_DASHBOARD_VERSION"},
Value: "nhost/dashboard:2.42.0",
Sources: cli.EnvVars("NHOST_DASHBOARD_VERSION"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagConfigserverImage,
Hidden: true,
Value: "",
EnvVars: []string{"NHOST_CONFIGSERVER_IMAGE"},
Sources: cli.EnvVars("NHOST_CONFIGSERVER_IMAGE"),
},
&cli.BoolFlag{ //nolint:exhaustruct
Name: flagDownOnError,
Usage: "Skip confirmation",
EnvVars: []string{"NHOST_YES"},
Sources: cli.EnvVars("NHOST_YES"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagCACertificates,
Usage: "Mounts and everrides path to CA certificates in the containers",
EnvVars: []string{"NHOST_CA_CERTIFICATES"},
Sources: cli.EnvVars("NHOST_CA_CERTIFICATES"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagSubdomain,
Usage: "Project's subdomain to operate on, defaults to linked project",
EnvVars: []string{"NHOST_SUBDOMAIN"},
Sources: cli.EnvVars("NHOST_SUBDOMAIN"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagPostgresURL,
Usage: "Postgres URL",
Required: true,
EnvVars: []string{"NHOST_POSTGRES_URL"},
Sources: cli.EnvVars("NHOST_POSTGRES_URL"),
},
},
}
}
func commandCloud(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandCloud(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
if !clienv.PathExists(ce.Path.NhostToml()) {
return errors.New( //nolint:err113
@@ -105,38 +105,38 @@ func commandCloud(cCtx *cli.Context) error {
)
}
proj, err := ce.GetAppInfo(cCtx.Context, cCtx.String(flagSubdomain))
proj, err := ce.GetAppInfo(ctx, cmd.String(flagSubdomain))
if err != nil {
return fmt.Errorf("failed to get app info: %w", err)
}
configserverImage := cCtx.String(flagConfigserverImage)
configserverImage := cmd.String(flagConfigserverImage)
if configserverImage == "" {
configserverImage = "nhost/cli:" + cCtx.App.Version
configserverImage = "nhost/cli:" + cmd.Root().Version
}
applySeeds := cCtx.Bool(flagApplySeeds)
applySeeds := cmd.Bool(flagApplySeeds)
return Cloud(
cCtx.Context,
ctx,
ce,
cCtx.App.Version,
cCtx.Uint(flagHTTPPort),
!cCtx.Bool(flagDisableTLS),
cmd.Root().Version,
cmd.Uint(flagHTTPPort),
!cmd.Bool(flagDisableTLS),
applySeeds,
dockercompose.ExposePorts{
Auth: cCtx.Uint(flagAuthPort),
Storage: cCtx.Uint(flagStoragePort),
Graphql: cCtx.Uint(flagsHasuraPort),
Console: cCtx.Uint(flagsHasuraConsolePort),
Functions: cCtx.Uint(flagsFunctionsPort),
Auth: cmd.Uint(flagAuthPort),
Storage: cmd.Uint(flagStoragePort),
Graphql: cmd.Uint(flagsHasuraPort),
Console: cmd.Uint(flagsHasuraConsolePort),
Functions: cmd.Uint(flagsFunctionsPort),
},
cCtx.String(flagDashboardVersion),
cmd.String(flagDashboardVersion),
configserverImage,
cCtx.String(flagCACertificates),
cCtx.Bool(flagDownOnError),
cmd.String(flagCACertificates),
cmd.Bool(flagDownOnError),
proj,
cCtx.String(flagPostgresURL),
cmd.String(flagPostgresURL),
)
}

View File

@@ -1,9 +1,11 @@
package dev
import (
"context"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/dockercompose"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandCompose() *cli.Command {
@@ -17,9 +19,9 @@ func CommandCompose() *cli.Command {
}
}
func commandCompose(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandCompose(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
dc := dockercompose.New(ce.Path.WorkingDir(), ce.Path.DockerCompose(), ce.ProjectName())
return dc.Wrapper(cCtx.Context, cCtx.Args().Slice()...) //nolint:wrapcheck
return dc.Wrapper(ctx, cmd.Args().Slice()...) //nolint:wrapcheck
}

View File

@@ -1,13 +1,13 @@
package dev
import "github.com/urfave/cli/v2"
import "github.com/urfave/cli/v3"
func Command() *cli.Command {
return &cli.Command{ //nolint:exhaustruct
Name: "dev",
Aliases: []string{},
Usage: "Operate local development environment",
Subcommands: []*cli.Command{
Commands: []*cli.Command{
CommandCompose(),
CommandHasura(),
},

View File

@@ -1,9 +1,11 @@
package dev
import (
"context"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/dockercompose"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -26,12 +28,12 @@ func CommandDown() *cli.Command {
}
}
func commandDown(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandDown(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
dc := dockercompose.New(ce.Path.WorkingDir(), ce.Path.DockerCompose(), ce.ProjectName())
if err := dc.Stop(cCtx.Context, cCtx.Bool(flagVolumes)); err != nil {
if err := dc.Stop(ctx, cmd.Bool(flagVolumes)); err != nil {
ce.Warnln("failed to stop Nhost development environment: %s", err)
}

View File

@@ -1,13 +1,14 @@
package dev
import (
"context"
"fmt"
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/dockercompose"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandHasura() *cli.Command {
@@ -21,8 +22,8 @@ func CommandHasura() *cli.Command {
}
}
func commandHasura(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandHasura(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
cfg := &model.ConfigConfig{} //nolint:exhaustruct
if err := clienv.UnmarshalFile(ce.Path.NhostToml(), cfg, toml.Unmarshal); err != nil {
@@ -32,10 +33,10 @@ func commandHasura(cCtx *cli.Context) error {
docker := dockercompose.NewDocker()
return docker.HasuraWrapper( //nolint:wrapcheck
cCtx.Context,
ctx,
ce.LocalSubdomain(),
ce.Path.NhostFolder(),
*cfg.Hasura.Version,
cCtx.Args().Slice()...,
cmd.Args().Slice()...,
)
}

View File

@@ -1,9 +1,11 @@
package dev
import (
"context"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/dockercompose"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandLogs() *cli.Command {
@@ -17,12 +19,12 @@ func CommandLogs() *cli.Command {
}
}
func commandLogs(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandLogs(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
dc := dockercompose.New(ce.Path.WorkingDir(), ce.Path.DockerCompose(), ce.ProjectName())
if err := dc.Logs(cCtx.Context, cCtx.Args().Slice()...); err != nil {
if err := dc.Logs(ctx, cmd.Args().Slice()...); err != nil {
ce.Warnln("%s", err)
}

View File

@@ -19,7 +19,7 @@ import (
"github.com/nhost/nhost/cli/cmd/software"
"github.com/nhost/nhost/cli/dockercompose"
"github.com/nhost/nhost/cli/project/env"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func deptr[T any](t *T) T { //nolint:ireturn
@@ -63,25 +63,25 @@ func CommandUp() *cli.Command { //nolint:funlen
Name: flagHTTPPort,
Usage: "HTTP port to listen on",
Value: defaultHTTPPort,
EnvVars: []string{"NHOST_HTTP_PORT"},
Sources: cli.EnvVars("NHOST_HTTP_PORT"),
},
&cli.BoolFlag{ //nolint:exhaustruct
Name: flagDisableTLS,
Usage: "Disable TLS",
Value: false,
EnvVars: []string{"NHOST_DISABLE_TLS"},
Sources: cli.EnvVars("NHOST_DISABLE_TLS"),
},
&cli.UintFlag{ //nolint:exhaustruct
Name: flagPostgresPort,
Usage: "Postgres port to listen on",
Value: defaultPostgresPort,
EnvVars: []string{"NHOST_POSTGRES_PORT"},
Sources: cli.EnvVars("NHOST_POSTGRES_PORT"),
},
&cli.BoolFlag{ //nolint:exhaustruct
Name: flagApplySeeds,
Usage: "Apply seeds. If the .nhost folder does not exist, seeds will be applied regardless of this flag",
Value: false,
EnvVars: []string{"NHOST_APPLY_SEEDS"},
Sources: cli.EnvVars("NHOST_APPLY_SEEDS"),
},
&cli.UintFlag{ //nolint:exhaustruct
Name: flagAuthPort,
@@ -111,39 +111,39 @@ func CommandUp() *cli.Command { //nolint:funlen
&cli.StringFlag{ //nolint:exhaustruct
Name: flagDashboardVersion,
Usage: "Dashboard version to use",
Value: "nhost/dashboard:2.33.0",
EnvVars: []string{"NHOST_DASHBOARD_VERSION"},
Value: "nhost/dashboard:2.42.0",
Sources: cli.EnvVars("NHOST_DASHBOARD_VERSION"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagConfigserverImage,
Hidden: true,
Value: "",
EnvVars: []string{"NHOST_CONFIGSERVER_IMAGE"},
Sources: cli.EnvVars("NHOST_CONFIGSERVER_IMAGE"),
},
&cli.StringSliceFlag{ //nolint:exhaustruct
Name: flagRunService,
Usage: "Run service to add to the development environment. Can be passed multiple times. Comma-separated values are also accepted. Format: /path/to/run-service.toml[:overlay_name]", //nolint:lll
EnvVars: []string{"NHOST_RUN_SERVICE"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE"),
},
&cli.BoolFlag{ //nolint:exhaustruct
Name: flagDownOnError,
Usage: "Skip confirmation",
EnvVars: []string{"NHOST_YES"},
Sources: cli.EnvVars("NHOST_YES"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagCACertificates,
Usage: "Mounts and everrides path to CA certificates in the containers",
EnvVars: []string{"NHOST_CA_CERTIFICATES"},
Sources: cli.EnvVars("NHOST_CA_CERTIFICATES"),
},
},
Subcommands: []*cli.Command{
Commands: []*cli.Command{
CommandCloud(),
},
}
}
func commandUp(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandUp(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
// projname to be root directory
@@ -159,33 +159,33 @@ func commandUp(cCtx *cli.Context) error {
)
}
configserverImage := cCtx.String(flagConfigserverImage)
configserverImage := cmd.String(flagConfigserverImage)
if configserverImage == "" {
configserverImage = "nhost/cli:" + cCtx.App.Version
configserverImage = "nhost/cli:" + cmd.Root().Version
}
applySeeds := cCtx.Bool(flagApplySeeds) || !clienv.PathExists(ce.Path.DotNhostFolder())
applySeeds := cmd.Bool(flagApplySeeds) || !clienv.PathExists(ce.Path.DotNhostFolder())
return Up(
cCtx.Context,
ctx,
ce,
cCtx.App.Version,
cCtx.Uint(flagHTTPPort),
!cCtx.Bool(flagDisableTLS),
cCtx.Uint(flagPostgresPort),
cmd.Root().Version,
cmd.Uint(flagHTTPPort),
!cmd.Bool(flagDisableTLS),
cmd.Uint(flagPostgresPort),
applySeeds,
dockercompose.ExposePorts{
Auth: cCtx.Uint(flagAuthPort),
Storage: cCtx.Uint(flagStoragePort),
Graphql: cCtx.Uint(flagsHasuraPort),
Console: cCtx.Uint(flagsHasuraConsolePort),
Functions: cCtx.Uint(flagsFunctionsPort),
Auth: cmd.Uint(flagAuthPort),
Storage: cmd.Uint(flagStoragePort),
Graphql: cmd.Uint(flagsHasuraPort),
Console: cmd.Uint(flagsHasuraConsolePort),
Functions: cmd.Uint(flagsFunctionsPort),
},
cCtx.String(flagDashboardVersion),
cmd.String(flagDashboardVersion),
configserverImage,
cCtx.String(flagCACertificates),
cCtx.StringSlice(flagRunService),
cCtx.Bool(flagDownOnError),
cmd.String(flagCACertificates),
cmd.StringSlice(flagRunService),
cmd.Bool(flagDownOnError),
)
}

View File

@@ -8,7 +8,7 @@ import (
"os/exec"
"github.com/nhost/nhost/cli/clienv"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -35,13 +35,13 @@ func CommandConfigure() *cli.Command {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagDockerConfig,
Usage: "Path to docker config file",
EnvVars: []string{"DOCKER_CONFIG"},
Sources: cli.EnvVars("DOCKER_CONFIG"),
Value: home + "/.docker/config.json",
},
&cli.BoolFlag{ //nolint:exhaustruct
Name: flagNoInteractive,
Usage: "Do not prompt for confirmation",
EnvVars: []string{"NO_INTERACTIVE"},
Sources: cli.EnvVars("NO_INTERACTIVE"),
Value: false,
},
},
@@ -140,21 +140,21 @@ func configureDocker(dockerConfig string) error {
return nil
}
func actionConfigure(c *cli.Context) error {
ce := clienv.FromCLI(c)
func actionConfigure(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
if err := writeScript(c.Context, ce); err != nil {
if err := writeScript(ctx, ce); err != nil {
return err
}
if c.Bool(flagNoInteractive) {
return configureDocker(c.String(flagDockerConfig))
if cmd.Bool(flagNoInteractive) {
return configureDocker(cmd.String(flagDockerConfig))
}
//nolint:lll
ce.PromptMessage(
"I am about to configure docker to authenticate with Nhost's registry. This will modify your docker config file on %s. Should I continue? [y/N] ",
c.String(flagDockerConfig),
cmd.String(flagDockerConfig),
)
v, err := ce.PromptInput(false)
@@ -163,7 +163,7 @@ func actionConfigure(c *cli.Context) error {
}
if v == "y" || v == "Y" {
return configureDocker(c.String(flagDockerConfig))
return configureDocker(cmd.String(flagDockerConfig))
}
return nil

View File

@@ -1,13 +1,13 @@
package dockercredentials
import "github.com/urfave/cli/v2"
import "github.com/urfave/cli/v3"
func Command() *cli.Command {
return &cli.Command{ //nolint:exhaustruct
Name: "docker-credentials",
Aliases: []string{},
Usage: "Perform docker-credentials operations",
Subcommands: []*cli.Command{
Commands: []*cli.Command{
CommandGet(),
CommandErase(),
CommandStore(),

View File

@@ -1,7 +1,9 @@
package dockercredentials
import (
"github.com/urfave/cli/v2"
"context"
"github.com/urfave/cli/v3"
)
func CommandErase() *cli.Command {
@@ -14,7 +16,7 @@ func CommandErase() *cli.Command {
}
}
func actionErase(c *cli.Context) error {
_, _ = c.App.Writer.Write([]byte("Please, use the nhost CLI to logout\n"))
func actionErase(_ context.Context, cmd *cli.Command) error {
_, _ = cmd.Root().Writer.Write([]byte("Please, use the nhost CLI to logout\n"))
return nil
}

View File

@@ -8,7 +8,7 @@ import (
"os"
"github.com/nhost/nhost/cli/clienv"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -26,14 +26,14 @@ func CommandGet() *cli.Command {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagAuthURL,
Usage: "Nhost auth URL",
EnvVars: []string{"NHOST_CLI_AUTH_URL"},
Sources: cli.EnvVars("NHOST_CLI_AUTH_URL"),
Value: "https://otsispdzcwxyqzbfntmj.auth.eu-central-1.nhost.run/v1",
Hidden: true,
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagGraphqlURL,
Usage: "Nhost GraphQL URL",
EnvVars: []string{"NHOST_CLI_GRAPHQL_URL"},
Sources: cli.EnvVars("NHOST_CLI_GRAPHQL_URL"),
Value: "https://otsispdzcwxyqzbfntmj.graphql.eu-central-1.nhost.run/v1",
Hidden: true,
},
@@ -69,15 +69,15 @@ type response struct {
Secret string `json:"Secret"`
}
func actionGet(c *cli.Context) error {
scanner := bufio.NewScanner(c.App.Reader)
func actionGet(ctx context.Context, cmd *cli.Command) error {
scanner := bufio.NewScanner(cmd.Root().Reader)
var input string
for scanner.Scan() {
input += scanner.Text()
}
token, err := getToken(c.Context, c.String(flagAuthURL), c.String(flagGraphqlURL))
token, err := getToken(ctx, cmd.String(flagAuthURL), cmd.String(flagGraphqlURL))
if err != nil {
return err
}
@@ -91,7 +91,7 @@ func actionGet(c *cli.Context) error {
return fmt.Errorf("failed to marshal response: %w", err)
}
if _, err = c.App.Writer.Write(b); err != nil {
if _, err = cmd.Root().Writer.Write(b); err != nil {
return fmt.Errorf("failed to write response: %w", err)
}

View File

@@ -1,7 +1,9 @@
package dockercredentials
import (
"github.com/urfave/cli/v2"
"context"
"github.com/urfave/cli/v3"
)
func CommandStore() *cli.Command {
@@ -14,7 +16,7 @@ func CommandStore() *cli.Command {
}
}
func actionStore(c *cli.Context) error {
_, _ = c.App.Writer.Write([]byte("Please, use the nhost CLI to login\n"))
func actionStore(_ context.Context, cmd *cli.Command) error {
_, _ = cmd.Root().Writer.Write([]byte("Please, use the nhost CLI to login\n"))
return nil
}

View File

@@ -0,0 +1,92 @@
package config
import (
"context"
"fmt"
"os"
"path/filepath"
"github.com/nhost/nhost/cli/mcp/config"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v3"
)
const (
flagConfirm = "confirm"
)
func Command() *cli.Command {
return &cli.Command{ //nolint:exhaustruct
Name: "config",
Usage: "Generate and save configuration file",
Flags: []cli.Flag{
&cli.BoolFlag{ //nolint:exhaustruct
Name: flagConfirm,
Usage: "Skip confirmation prompt",
Value: false,
Sources: cli.EnvVars("CONFIRM"),
},
},
Commands: []*cli.Command{
{
Name: "dump",
Usage: "Dump the configuration to stdout for verification",
Flags: []cli.Flag{},
Action: actionDump,
},
},
Action: action,
}
}
//nolint:forbidigo
func action(_ context.Context, cmd *cli.Command) error {
cfg, err := config.RunWizard()
if err != nil {
return cli.Exit(fmt.Sprintf("failed to run wizard: %s", err), 1)
}
tomlData, err := toml.Marshal(cfg)
if err != nil {
return cli.Exit(fmt.Sprintf("failed to marshal config: %s", err), 1)
}
fmt.Println("Configuration Preview:")
fmt.Println("---------------------")
fmt.Println(string(tomlData))
fmt.Println()
filePath := config.GetConfigPath(cmd)
fmt.Printf("Save configuration to %s?\n", filePath)
fmt.Print("Proceed? (y/N): ")
var confirm string
if _, err := fmt.Scanln(&confirm); err != nil {
return cli.Exit(fmt.Sprintf("failed to read input: %s", err), 1)
}
if confirm != "y" && confirm != "Y" {
fmt.Println("Operation cancelled.")
return nil
}
dir := filepath.Dir(filePath)
if err := os.MkdirAll(dir, 0o755); err != nil { //nolint:mnd
return fmt.Errorf("failed to create config directory: %w", err)
}
data, err := toml.Marshal(cfg)
if err != nil {
return fmt.Errorf("failed to marshal config: %w", err)
}
if err := os.WriteFile(filePath, data, 0o600); err != nil { //nolint:mnd
return fmt.Errorf("failed to write config file: %w", err)
}
fmt.Println("\nConfiguration saved successfully!")
fmt.Println("Note: Review the documentation for additional configuration options,")
fmt.Println(" especially for fine-tuning LLM access permissions.")
return nil
}

View File

@@ -0,0 +1,35 @@
package config
import (
"context"
"fmt"
"github.com/nhost/nhost/cli/mcp/config"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v3"
)
func actionDump(_ context.Context, cmd *cli.Command) error {
configPath := config.GetConfigPath(cmd)
if configPath == "" {
return cli.Exit("config file path is required", 1)
}
cfg, err := config.Load(configPath)
if err != nil {
fmt.Println("Please, run `nhost mcp config` to configure the service.") //nolint:forbidigo
return cli.Exit("failed to load config file "+err.Error(), 1)
}
b, err := toml.Marshal(cfg)
if err != nil {
return cli.Exit("failed to marshal config file "+err.Error(), 1)
}
fmt.Println("Configuration Preview:") //nolint:forbidigo
fmt.Println("---------------------") //nolint:forbidigo
fmt.Println(string(b)) //nolint:forbidigo
fmt.Println() //nolint:forbidigo
return nil
}

117
cli/cmd/mcp/gen/gen.go Normal file
View File

@@ -0,0 +1,117 @@
package gen
import (
"context"
"fmt"
"github.com/nhost/nhost/cli/mcp/graphql"
"github.com/nhost/nhost/cli/mcp/nhost/auth"
"github.com/urfave/cli/v3"
)
const (
flagNhostAuthURL = "nhost-auth-url"
flagNhostGraphqlURL = "nhost-graphql-url"
flagNhostPAT = "nhost-pat"
flagWithMutations = "with-mutations"
)
func Command() *cli.Command {
return &cli.Command{ //nolint:exhaustruct
Name: "gen",
Usage: "Generate GraphQL schema for Nhost Cloud",
Flags: []cli.Flag{
&cli.StringFlag{ //nolint:exhaustruct
Name: flagNhostAuthURL,
Usage: "Nhost auth URL",
Hidden: true,
Value: "https://otsispdzcwxyqzbfntmj.auth.eu-central-1.nhost.run/v1",
Sources: cli.EnvVars("NHOST_AUTH_URL"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagNhostGraphqlURL,
Usage: "Nhost GraphQL URL",
Hidden: true,
Value: "https://otsispdzcwxyqzbfntmj.graphql.eu-central-1.nhost.run/v1",
Sources: cli.EnvVars("NHOST_GRAPHQL_URL"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagNhostPAT,
Usage: "Personal Access Token",
Required: true,
Sources: cli.EnvVars("NHOST_PAT"),
},
&cli.BoolFlag{ //nolint:exhaustruct
Name: flagWithMutations,
Usage: "Include mutations in the generated schema",
Value: false,
Sources: cli.EnvVars("WITH_MUTATIONS"),
},
},
Action: action,
}
}
func action(ctx context.Context, cmd *cli.Command) error {
interceptor, err := auth.WithPAT(
cmd.String(flagNhostAuthURL), cmd.String(flagNhostPAT),
)
if err != nil {
return cli.Exit(err.Error(), 1)
}
var introspection graphql.ResponseIntrospection
if err := graphql.Query(
ctx,
cmd.String(flagNhostGraphqlURL),
graphql.IntrospectionQuery,
nil,
&introspection,
nil,
nil,
interceptor,
); err != nil {
return cli.Exit(err.Error(), 1)
}
filter := graphql.Filter{
AllowQueries: []graphql.Queries{
{
Name: "organizations",
DisableNesting: true,
},
{
Name: "organization",
DisableNesting: true,
},
{
Name: "app",
DisableNesting: true,
},
{
Name: "apps",
DisableNesting: true,
},
{
Name: "config",
DisableNesting: false,
},
},
AllowMutations: []graphql.Queries{},
}
if cmd.Bool(flagWithMutations) {
filter.AllowMutations = []graphql.Queries{
{
Name: "updateConfig",
DisableNesting: false,
},
}
}
schema := graphql.ParseSchema(introspection, filter)
fmt.Print(schema) //nolint:forbidigo
return nil
}

33
cli/cmd/mcp/mcp.go Normal file
View File

@@ -0,0 +1,33 @@
package mcp
import (
"github.com/nhost/nhost/cli/cmd/mcp/config"
"github.com/nhost/nhost/cli/cmd/mcp/gen"
"github.com/nhost/nhost/cli/cmd/mcp/start"
"github.com/urfave/cli/v3"
)
const (
flagConfigFile = "config-file"
)
func Command() *cli.Command {
return &cli.Command{ //nolint:exhaustruct
Name: "mcp",
Aliases: []string{},
Usage: "Model Context Protocol (MCP) related commands",
Flags: []cli.Flag{
&cli.StringFlag{ //nolint:exhaustruct
Name: flagConfigFile,
Usage: "Configuration file path. Defaults to $NHOST_DOT_NHOST_FOLDER/nhost-mcp.toml",
Value: "",
Sources: cli.EnvVars("NHOST_MCP_CONFIG_FILE"),
},
},
Commands: []*cli.Command{
config.Command(),
start.Command(),
gen.Command(),
},
}
}

403
cli/cmd/mcp/mcp_test.go Normal file
View File

@@ -0,0 +1,403 @@
package mcp_test
import (
"bytes"
"context"
"testing"
"time"
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/mark3labs/mcp-go/client"
"github.com/mark3labs/mcp-go/client/transport"
"github.com/mark3labs/mcp-go/mcp"
nhostmcp "github.com/nhost/nhost/cli/cmd/mcp"
"github.com/nhost/nhost/cli/cmd/mcp/start"
"github.com/nhost/nhost/cli/cmd/user"
"github.com/nhost/nhost/cli/mcp/resources"
"github.com/nhost/nhost/cli/mcp/tools/cloud"
"github.com/nhost/nhost/cli/mcp/tools/docs"
"github.com/nhost/nhost/cli/mcp/tools/project"
"github.com/nhost/nhost/cli/mcp/tools/schemas"
)
func ptr[T any](v T) *T {
return &v
}
func TestStart(t *testing.T) { //nolint:cyclop,maintidx,paralleltest
loginCmd := user.CommandLogin()
mcpCmd := nhostmcp.Command()
buf := bytes.NewBuffer(nil)
mcpCmd.Writer = buf
go func() {
t.Setenv("HOME", t.TempDir())
if err := loginCmd.Run(
context.Background(),
[]string{
"main",
"--pat=user-pat",
},
); err != nil {
panic(err)
}
if err := mcpCmd.Run(
context.Background(),
[]string{
"main",
"start",
"--bind=:9000",
"--config-file=testdata/sample.toml",
},
); err != nil {
panic(err)
}
}()
time.Sleep(time.Second)
transportClient, err := transport.NewSSE("http://localhost:9000/sse")
if err != nil {
t.Fatalf("failed to create transport client: %v", err)
}
mcpClient := client.NewClient(transportClient)
if err := mcpClient.Start(t.Context()); err != nil {
t.Fatalf("failed to start mcp client: %v", err)
}
defer mcpClient.Close()
initRequest := mcp.InitializeRequest{} //nolint:exhaustruct
initRequest.Params.ProtocolVersion = mcp.LATEST_PROTOCOL_VERSION
initRequest.Params.ClientInfo = mcp.Implementation{
Name: "example-client",
Version: "1.0.0",
}
res, err := mcpClient.Initialize(
context.Background(),
initRequest,
)
if err != nil {
t.Fatalf("failed to initialize mcp client: %v", err)
}
if diff := cmp.Diff(
res,
//nolint:tagalign
&mcp.InitializeResult{
ProtocolVersion: "2025-06-18",
Capabilities: mcp.ServerCapabilities{
Elicitation: nil,
Experimental: nil,
Logging: nil,
Prompts: nil,
Resources: &struct {
Subscribe bool "json:\"subscribe,omitempty\""
ListChanged bool "json:\"listChanged,omitempty\""
}{
Subscribe: false,
ListChanged: false,
},
Sampling: nil,
Tools: &struct {
ListChanged bool "json:\"listChanged,omitempty\""
}{
ListChanged: true,
},
},
ServerInfo: mcp.Implementation{
Name: "mcp",
Version: "",
},
Instructions: start.ServerInstructions + `
Configured projects:
- local (local): Local development project running via the Nhost CLI
- asdasdasdasdasd (eu-central-1): Staging project for my awesome app
- qweqweqweqweqwe (us-east-1): Production project for my awesome app
The following resources are available:
- schema://nhost-cloud: Schema to interact with the Nhost Cloud. Projects are equivalent
to apps in the schema. IDs are typically uuids.
- schema://graphql-management: GraphQL's management schema for an Nhost project.
This tool is useful to properly understand how manage hasura metadata, migrations,
permissions, remote schemas, etc.
- schema://nhost.toml: Cuelang schema for the nhost.toml configuration file. Run nhost
config validate after making changes to your nhost.toml file to ensure it is valid.
`,
Result: mcp.Result{
Meta: nil,
},
},
); diff != "" {
t.Errorf("ServerInfo mismatch (-want +got):\n%s", diff)
}
tools, err := mcpClient.ListTools(
context.Background(),
mcp.ListToolsRequest{}, //nolint:exhaustruct
)
if err != nil {
t.Fatalf("failed to list tools: %v", err)
}
if diff := cmp.Diff(
tools,
//nolint:exhaustruct,lll
&mcp.ListToolsResult{
Tools: []mcp.Tool{
{
Name: "cloud-graphql-query",
Description: cloud.ToolGraphqlQueryInstructions,
InputSchema: mcp.ToolInputSchema{
Type: "object",
Properties: map[string]any{
"query": map[string]any{
"description": "graphql query to perform",
"type": "string",
},
"variables": map[string]any{
"description": "variables to use in the query",
"type": "string",
},
},
Required: []string{"query"},
},
Annotations: mcp.ToolAnnotation{
Title: "Perform GraphQL Query on Nhost Cloud Platform",
ReadOnlyHint: ptr(false),
DestructiveHint: ptr(true),
IdempotentHint: ptr(false),
OpenWorldHint: ptr(true),
},
},
{
Name: "get-schema",
Description: schemas.ToolGetGraphqlSchemaInstructions,
InputSchema: mcp.ToolInputSchema{
Type: "object",
Properties: map[string]any{
"role": map[string]any{
"description": string("role to use when executing queries. Keep in mind the schema depends on the role so if you retrieved the schema for a different role previously retrieve it for this role beforehand as it might differ"),
"type": string("string"),
},
"subdomain": map[string]any{
"description": string("Project to get the GraphQL schema for. Required when service is `project`"),
"enum": []any{string("local"), string("asdasdasdasdasd"), string("qweqweqweqweqwe")},
"type": string("string"),
},
"mutations": map[string]any{
"description": string("list of mutations to fetch"),
"type": string("array"),
"items": map[string]any{"type": string("string")},
},
"queries": map[string]any{
"description": string("list of queries to fetch"),
"type": string("array"),
"items": map[string]any{"type": string("string")},
},
"summary": map[string]any{
"default": bool(true),
"description": string("only return a summary of the schema"),
"type": string("boolean"),
},
},
Required: []string{"role", "subdomain"},
},
Annotations: mcp.ToolAnnotation{
Title: "Get GraphQL/API schema for various services",
ReadOnlyHint: ptr(true),
DestructiveHint: ptr(false),
IdempotentHint: ptr(true),
OpenWorldHint: ptr(true),
},
},
{
Name: "graphql-query",
Description: project.ToolGraphqlQueryInstructions,
InputSchema: mcp.ToolInputSchema{
Type: "object",
Properties: map[string]any{
"query": map[string]any{
"description": "graphql query to perform",
"type": "string",
},
"subdomain": map[string]any{
"description": "Project to perform the GraphQL query against",
"type": "string",
"enum": []any{
string("local"),
string("asdasdasdasdasd"),
string("qweqweqweqweqwe"),
},
},
"role": map[string]any{
"description": "role to use when executing queries. Keep in mind the schema depends on the role so if you retrieved the schema for a different role previously retrieve it for this role beforehand as it might differ",
"type": "string",
},
"userId": map[string]any{
"description": string("Overrides X-Hasura-User-Id in the GraphQL query/mutation. Credentials must allow it (i.e. admin secret must be in use)"),
"type": string("string"),
},
"variables": map[string]any{
"description": "variables to use in the query",
"type": "string",
},
},
Required: []string{"query", "subdomain", "role"},
},
Annotations: mcp.ToolAnnotation{
Title: "Perform GraphQL Query on Nhost Project running on Nhost Cloud",
ReadOnlyHint: ptr(false),
DestructiveHint: ptr(true),
IdempotentHint: ptr(false),
OpenWorldHint: ptr(true),
},
},
{
Name: "manage-graphql",
Description: project.ToolManageGraphqlInstructions,
InputSchema: mcp.ToolInputSchema{
Type: "object",
Properties: map[string]any{
"body": map[string]any{
"description": "The body for the HTTP request",
"type": "string",
},
"path": map[string]any{
"description": "The path for the HTTP request",
"type": "string",
},
"subdomain": map[string]any{
"description": "Project to perform the GraphQL management operation against",
"type": "string",
"enum": []any{
string("local"),
string("asdasdasdasdasd"),
string("qweqweqweqweqwe"),
},
},
},
Required: []string{"subdomain", "path", "body"},
},
Annotations: mcp.ToolAnnotation{
Title: "Manage GraphQL's Metadata on an Nhost Development Project",
ReadOnlyHint: ptr(false),
DestructiveHint: ptr(true),
IdempotentHint: ptr(true),
OpenWorldHint: ptr(true),
},
},
{
Name: "search",
Description: docs.ToolSearchInstructions,
InputSchema: mcp.ToolInputSchema{
Type: "object",
Properties: map[string]any{
"query": map[string]any{
"description": string("The search query"),
"type": string("string"),
},
},
Required: []string{"query"},
},
Annotations: mcp.ToolAnnotation{
Title: "Search Nhost Docs",
ReadOnlyHint: ptr(true),
IdempotentHint: ptr(true),
DestructiveHint: ptr(false),
OpenWorldHint: ptr(true),
},
},
},
},
cmpopts.SortSlices(func(a, b mcp.Tool) bool {
return a.Name < b.Name
}),
); diff != "" {
t.Errorf("ListToolsResult mismatch (-want +got):\n%s", diff)
}
resourceList, err := mcpClient.ListResources(
context.Background(),
mcp.ListResourcesRequest{}, //nolint:exhaustruct
)
if err != nil {
t.Fatalf("failed to list resources: %v", err)
}
if diff := cmp.Diff(
resourceList,
//nolint:exhaustruct
&mcp.ListResourcesResult{
Resources: []mcp.Resource{
{
Annotated: mcp.Annotated{
Annotations: &mcp.Annotations{
Audience: []mcp.Role{"agent"},
Priority: 9,
},
},
URI: "schema://graphql-management",
Name: "graphql-management",
Description: resources.GraphqlManagementDescription,
MIMEType: "text/plain",
},
{
Annotated: mcp.Annotated{
Annotations: &mcp.Annotations{
Audience: []mcp.Role{"agent"},
Priority: 9,
},
},
URI: "schema://nhost-cloud",
Name: "nhost-cloud",
Description: resources.CloudDescription,
MIMEType: "text/plain",
},
{
Annotated: mcp.Annotated{
Annotations: &mcp.Annotations{
Audience: []mcp.Role{"agent"},
Priority: 9,
},
},
URI: "schema://nhost.toml",
Name: "nhost.toml",
Description: resources.NhostTomlResourceDescription,
MIMEType: "text/plain",
},
},
},
); diff != "" {
t.Errorf("ListResourcesResult mismatch (-want +got):\n%s", diff)
}
if res.Capabilities.Prompts != nil {
prompts, err := mcpClient.ListPrompts(
context.Background(),
mcp.ListPromptsRequest{}, //nolint:exhaustruct
)
if err != nil {
t.Fatalf("failed to list prompts: %v", err)
}
if diff := cmp.Diff(
prompts,
//nolint:exhaustruct
&mcp.ListPromptsResult{
Prompts: []mcp.Prompt{},
},
); diff != "" {
t.Errorf("ListPromptsResult mismatch (-want +got):\n%s", diff)
}
}
}

208
cli/cmd/mcp/start/start.go Normal file
View File

@@ -0,0 +1,208 @@
package start
import (
"context"
"fmt"
"github.com/mark3labs/mcp-go/server"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/mcp/config"
"github.com/nhost/nhost/cli/mcp/nhost/auth"
"github.com/nhost/nhost/cli/mcp/resources"
"github.com/nhost/nhost/cli/mcp/tools/cloud"
"github.com/nhost/nhost/cli/mcp/tools/docs"
"github.com/nhost/nhost/cli/mcp/tools/project"
"github.com/nhost/nhost/cli/mcp/tools/schemas"
"github.com/urfave/cli/v3"
)
const (
flagNhostAuthURL = "nhost-auth-url"
flagNhostGraphqlURL = "nhost-graphql-url"
flagBind = "bind"
)
const (
// this seems to be largely ignored by clients, or at least by cursor.
// we also need to look into roots and resources as those might be helpful.
ServerInstructions = `
This is an MCP server to interact with the Nhost Cloud and with Nhost projects.
Important notes to anyone using this MCP server. Do not use this MCP server without
following these instructions:
1. Make sure you are clear on which environment the user wants to operate against.
2. Before attempting to call any tool, always make sure you list resources, roots, and
resource templates to understand what is available.
3. Apps and projects are the same and while users may talk about projects in Nhost's GraphQL
api those are referred as apps.
4. If you have an error querying the GraphQL API, please check the schema again. The schema may
have changed and the query you are using may be invalid.
5. Always follow the instructions provided by each tool. If you need to deviate from these
instructions, please, confirm with the user before doing so.
`
)
func Command() *cli.Command {
return &cli.Command{ //nolint:exhaustruct
Name: "start",
Usage: "Starts the MCP server",
Flags: []cli.Flag{
&cli.StringFlag{ //nolint:exhaustruct
Name: flagNhostAuthURL,
Usage: "Nhost auth URL",
Hidden: true,
Value: "https://otsispdzcwxyqzbfntmj.auth.eu-central-1.nhost.run/v1",
Category: "Cloud Platform",
Sources: cli.EnvVars("NHOST_AUTH_URL"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagNhostGraphqlURL,
Usage: "Nhost GraphQL URL",
Hidden: true,
Value: "https://otsispdzcwxyqzbfntmj.graphql.eu-central-1.nhost.run/v1",
Category: "Cloud Platform",
Sources: cli.EnvVars("NHOST_GRAPHQL_URL"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagBind,
Usage: "Bind address in the form $host:$port. If omitted use stdio",
Required: false,
Category: "General",
Sources: cli.EnvVars("BIND"),
},
},
Action: action,
}
}
func action(ctx context.Context, cmd *cli.Command) error {
cfg, err := getConfig(cmd)
if err != nil {
return err
}
ServerInstructions := ServerInstructions
ServerInstructions += "\n\n"
ServerInstructions += cfg.Projects.Instructions()
ServerInstructions += "\n"
ServerInstructions += resources.Instructions()
mcpServer := server.NewMCPServer(
cmd.Root().Name,
cmd.Root().Version,
server.WithInstructions(ServerInstructions),
)
if err := resources.Register(cfg, mcpServer); err != nil {
return cli.Exit(fmt.Sprintf("failed to register resources: %s", err), 1)
}
if cfg.Cloud != nil {
if err := registerCloud(
cmd,
mcpServer,
cfg,
cmd.String(flagNhostAuthURL),
cmd.String(flagNhostGraphqlURL),
); err != nil {
return cli.Exit(fmt.Sprintf("failed to register cloud tools: %s", err), 1)
}
}
if len(cfg.Projects) > 0 {
if err := registerProjectTool(mcpServer, cfg); err != nil {
return cli.Exit(fmt.Sprintf("failed to register project tools: %s", err), 1)
}
}
resources := schemas.NewTool(cfg)
resources.Register(mcpServer)
d, err := docs.NewTool(ctx)
if err != nil {
return cli.Exit(fmt.Sprintf("failed to initialize docs tools: %s", err), 1)
}
d.Register(mcpServer)
return start(mcpServer, cmd.String(flagBind))
}
func getConfig(cmd *cli.Command) (*config.Config, error) {
configPath := config.GetConfigPath(cmd)
if configPath == "" {
return nil, cli.Exit("config file path is required", 1)
}
cfg, err := config.Load(configPath)
if err != nil {
fmt.Println("Please, run `nhost mcp config` to configure the service.") //nolint:forbidigo
return nil, cli.Exit("failed to load config file "+err.Error(), 1)
}
return cfg, nil
}
func registerCloud(
cmd *cli.Command,
mcpServer *server.MCPServer,
cfg *config.Config,
authURL string,
graphqlURL string,
) error {
ce := clienv.FromCLI(cmd)
creds, err := ce.Credentials()
if err != nil {
return fmt.Errorf("failed to load credentials: %w", err)
}
interceptor, err := auth.WithPAT(
authURL,
creds.PersonalAccessToken,
)
if err != nil {
return fmt.Errorf("failed to create PAT interceptor: %w", err)
}
cloudTool := cloud.NewTool(
graphqlURL, cfg.Cloud.EnableMutations, interceptor,
)
if err := cloudTool.Register(mcpServer); err != nil {
return fmt.Errorf("failed to register tools: %w", err)
}
return nil
}
func registerProjectTool(
mcpServer *server.MCPServer,
cfg *config.Config,
) error {
projectTool := project.NewTool(cfg)
if err := projectTool.Register(mcpServer); err != nil {
return fmt.Errorf("failed to register tool: %w", err)
}
return nil
}
func start(
mcpServer *server.MCPServer,
bind string,
) error {
if bind != "" {
sseServer := server.NewSSEServer(mcpServer, server.WithBaseURL(bind))
if err := sseServer.Start(bind); err != nil {
return cli.Exit(fmt.Sprintf("failed to serve tcp: %v", err), 1)
}
} else {
if err := server.ServeStdio(mcpServer); err != nil {
return cli.Exit(fmt.Sprintf("failed to serve stdio: %v", err), 1)
}
}
return nil
}

29
cli/cmd/mcp/testdata/sample.toml vendored Normal file
View File

@@ -0,0 +1,29 @@
[cloud]
enable_mutations = true
[[projects]]
subdomain = 'local'
region = 'local'
description = 'Local development project running via the Nhost CLI'
admin_secret = 'nhost-admin-secret'
manage_metadata = true
allow_queries = ['*']
allow_mutations = ['*']
[[projects]]
subdomain = 'asdasdasdasdasd'
region = 'eu-central-1'
description = 'Staging project for my awesome app'
manage_metadata = false
admin_secret = 'your-admin-secret-1'
allow_queries = ['*']
allow_mutations = ['*']
[[projects]]
subdomain = 'qweqweqweqweqwe'
region = 'us-east-1'
description = 'Production project for my awesome app'
manage_metadata = false
pat = 'pat-for-qweqweqweqweqwe'
allow_queries = ['getComments']
allow_mutations = ['insertComment', 'updateComment', 'deleteComment']

View File

@@ -9,12 +9,12 @@ import (
"os"
"path/filepath"
"github.com/hashicorp/go-getter"
"github.com/hashicorp/go-getter/v2"
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/cmd/config"
"github.com/nhost/nhost/cli/dockercompose"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
"gopkg.in/yaml.v3"
)
@@ -75,14 +75,14 @@ func CommandInit() *cli.Command {
Name: flagRemote,
Usage: "Initialize pulling configuration, migrations and metadata from the linked project",
Value: false,
EnvVars: []string{"NHOST_REMOTE"},
Sources: cli.EnvVars("NHOST_REMOTE"),
},
},
}
}
func commandInit(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandInit(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
if clienv.PathExists(ce.Path.NhostFolder()) {
return errors.New("nhost folder already exists") //nolint:err113
@@ -98,12 +98,12 @@ func commandInit(cCtx *cli.Context) error {
return fmt.Errorf("failed to initialize configuration: %w", err)
}
if cCtx.Bool(flagRemote) {
if err := InitRemote(cCtx.Context, ce); err != nil {
if cmd.Bool(flagRemote) {
if err := InitRemote(ctx, ce); err != nil {
return fmt.Errorf("failed to initialize remote project: %w", err)
}
} else {
if err := initInit(cCtx.Context, ce.Path); err != nil {
if err := initInit(ctx, ce.Path); err != nil {
return fmt.Errorf("failed to initialize project: %w", err)
}
}
@@ -129,17 +129,12 @@ func initInit(
return err
}
getclient := &getter.Client{ //nolint:exhaustruct
Ctx: ctx,
Src: "github.com/nhost/hasura-auth/email-templates",
Dst: "nhost/emails",
Mode: getter.ClientModeAny,
Detectors: []getter.Detector{
&getter.GitHubDetector{},
},
}
if err := getclient.Get(); err != nil {
getclient := &getter.Client{} //nolint:exhaustruct
if _, err := getclient.Get(ctx, &getter.Request{ //nolint:exhaustruct
Src: "git::https://github.com/nhost/nhost.git//services/auth/email-templates",
Dst: "nhost/emails",
DisableSymlinks: true,
}); err != nil {
return fmt.Errorf("failed to download email templates: %w", err)
}

View File

@@ -1,11 +1,12 @@
package project
import (
"context"
"fmt"
"os"
"github.com/nhost/nhost/cli/clienv"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandLink() *cli.Command {
@@ -18,14 +19,14 @@ func CommandLink() *cli.Command {
}
}
func commandLink(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandLink(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
if err := os.MkdirAll(ce.Path.DotNhostFolder(), 0o755); err != nil { //nolint:mnd
return fmt.Errorf("failed to create .nhost folder: %w", err)
}
_, err := ce.Link(cCtx.Context)
_, err := ce.Link(ctx)
return err //nolint:wrapcheck
}

View File

@@ -5,7 +5,7 @@ import (
"fmt"
"github.com/nhost/nhost/cli/clienv"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandList() *cli.Command {
@@ -18,9 +18,9 @@ func CommandList() *cli.Command {
}
}
func commandList(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
return List(cCtx.Context, ce)
func commandList(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
return List(ctx, ce)
}
func List(ctx context.Context, ce *clienv.CliEnv) error {

View File

@@ -1,13 +1,14 @@
package run
import (
"context"
"encoding/json"
"fmt"
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/nhostclient/graphql"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandConfigDeploy() *cli.Command {
@@ -23,13 +24,13 @@ func CommandConfigDeploy() *cli.Command {
Usage: "Service configuration file",
Value: "nhost-run-service.toml",
Required: true,
EnvVars: []string{"NHOST_RUN_SERVICE_CONFIG"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_CONFIG"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagServiceID,
Usage: "Service ID to update. Applies overlay of the same name",
Required: true,
EnvVars: []string{"NHOST_RUN_SERVICE_ID"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_ID"),
},
},
}
@@ -49,23 +50,23 @@ func transform[T, V any](t *T) (*V, error) {
return &v, nil
}
func commandConfigDeploy(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandConfigDeploy(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
cl, err := ce.GetNhostClient(cCtx.Context)
cl, err := ce.GetNhostClient(ctx)
if err != nil {
return fmt.Errorf("failed to get nhost client: %w", err)
}
secrets, appID, err := getRemoteSecrets(cCtx.Context, cl, cCtx.String(flagServiceID))
secrets, appID, err := getRemoteSecrets(ctx, cl, cmd.String(flagServiceID))
if err != nil {
return err
}
cfg, err := Validate(
ce,
cCtx.String(flagConfig),
cCtx.String(flagServiceID),
cmd.String(flagConfig),
cmd.String(flagServiceID),
secrets,
true,
)
@@ -81,9 +82,9 @@ func commandConfigDeploy(cCtx *cli.Context) error {
}
if _, err := cl.ReplaceRunServiceConfig(
cCtx.Context,
ctx,
appID,
cCtx.String(flagServiceID),
cmd.String(flagServiceID),
*replaceConfig,
); err != nil {
return fmt.Errorf("failed to replace service config: %w", err)

View File

@@ -1,6 +1,7 @@
package run
import (
"context"
"fmt"
"os"
"path/filepath"
@@ -8,7 +9,7 @@ import (
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/cmd/config"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const flagEditor = "editor"
@@ -25,31 +26,31 @@ func CommandConfigEdit() *cli.Command {
Usage: "Service configuration file",
Value: "nhost-run-service.toml",
Required: true,
EnvVars: []string{"NHOST_RUN_SERVICE_CONFIG"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_CONFIG"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagEditor,
Usage: "Editor to use",
Value: "vim",
EnvVars: []string{"EDITOR"},
Sources: cli.EnvVars("EDITOR"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagOverlayName,
Usage: "If specified, apply this overlay",
EnvVars: []string{"NHOST_RUN_SERVICE_ID", "NHOST_SERVICE_OVERLAY_NAME"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_ID", "NHOST_SERVICE_OVERLAY_NAME"),
},
},
Action: commandConfigEdit,
}
}
func commandConfigEdit(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandConfigEdit(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
overlayName := cCtx.String(flagOverlayName)
overlayName := cmd.String(flagOverlayName)
if overlayName == "" {
if err := config.EditFile(
cCtx.Context, cCtx.String(flagEditor), cCtx.String(flagConfig),
ctx, cmd.String(flagEditor), cmd.String(flagConfig),
); err != nil {
return fmt.Errorf("failed to edit config: %w", err)
}
@@ -58,7 +59,7 @@ func commandConfigEdit(cCtx *cli.Context) error {
}
if err := os.MkdirAll(ce.Path.RunServiceOverlaysFolder(
cCtx.String(flagConfig),
cmd.String(flagConfig),
), 0o755); err != nil { //nolint:mnd
return fmt.Errorf("failed to create json patches directory: %w", err)
}
@@ -72,21 +73,21 @@ func commandConfigEdit(cCtx *cli.Context) error {
tmpfileName := filepath.Join(tmpdir, "nhost.toml")
if err := config.CopyConfig[model.ConfigRunServiceConfig](
cCtx.String(flagConfig),
cmd.String(flagConfig),
tmpfileName,
ce.Path.RunServiceOverlay(cCtx.String(flagConfig), overlayName),
ce.Path.RunServiceOverlay(cmd.String(flagConfig), overlayName),
); err != nil {
return fmt.Errorf("failed to copy config: %w", err)
}
if err := config.EditFile(cCtx.Context, cCtx.String(flagEditor), tmpfileName); err != nil {
if err := config.EditFile(ctx, cmd.String(flagEditor), tmpfileName); err != nil {
return fmt.Errorf("failed to edit config: %w", err)
}
if err := config.GenerateJSONPatch(
cCtx.String(flagConfig),
cmd.String(flagConfig),
tmpfileName,
ce.Path.RunServiceOverlay(cCtx.String(flagConfig), overlayName),
ce.Path.RunServiceOverlay(cmd.String(flagConfig), overlayName),
); err != nil {
return fmt.Errorf("failed to generate json patch: %w", err)
}

View File

@@ -1,12 +1,13 @@
package run
import (
"context"
"fmt"
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/nhost/cli/clienv"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const flagImage = "image"
@@ -22,29 +23,29 @@ func CommandConfigEditImage() *cli.Command {
Aliases: []string{},
Usage: "Service configuration file",
Value: "nhost-run-service.toml",
EnvVars: []string{"NHOST_RUN_SERVICE_CONFIG"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_CONFIG"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagImage,
Aliases: []string{},
Usage: "Image to use",
Required: true,
EnvVars: []string{"NHOST_RUN_SERVICE_IMAGE"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_IMAGE"),
},
},
Action: commandConfigEditImage,
}
}
func commandConfigEditImage(cCtx *cli.Context) error {
func commandConfigEditImage(_ context.Context, cmd *cli.Command) error {
var cfg model.ConfigRunServiceConfig
if err := clienv.UnmarshalFile(cCtx.String(flagConfig), &cfg, toml.Unmarshal); err != nil {
if err := clienv.UnmarshalFile(cmd.String(flagConfig), &cfg, toml.Unmarshal); err != nil {
return fmt.Errorf("failed to unmarshal config: %w", err)
}
cfg.Image.Image = cCtx.String(flagImage)
cfg.Image.Image = cmd.String(flagImage)
if err := clienv.MarshalFile(cfg, cCtx.String(flagConfig), toml.Marshal); err != nil {
if err := clienv.MarshalFile(cfg, cmd.String(flagConfig), toml.Marshal); err != nil {
return fmt.Errorf("failed to marshal config: %w", err)
}

View File

@@ -1,13 +1,14 @@
package run
import (
"context"
"fmt"
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/be/services/mimir/schema"
"github.com/nhost/nhost/cli/clienv"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func ptr[T any](v T) *T {
@@ -24,8 +25,8 @@ func CommandConfigExample() *cli.Command {
}
}
func commandConfigExample(cCtx *cli.Context) error { //nolint:funlen
ce := clienv.FromCLI(cCtx)
func commandConfigExample(_ context.Context, cmd *cli.Command) error { //nolint:funlen
ce := clienv.FromCLI(cmd)
//nolint:mnd
cfg := &model.ConfigRunServiceConfig{

View File

@@ -1,13 +1,14 @@
package run
import (
"context"
"encoding/json"
"fmt"
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/nhost/cli/clienv"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const flagServiceID = "service-id"
@@ -23,36 +24,36 @@ func CommandConfigPull() *cli.Command {
Aliases: []string{},
Usage: "Service configuration file",
Value: "nhost-run-service.toml",
EnvVars: []string{"NHOST_RUN_SERVICE_CONFIG"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_CONFIG"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagServiceID,
Usage: "Service ID to update",
Required: true,
EnvVars: []string{"NHOST_RUN_SERVICE_ID"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_ID"),
},
},
Action: commandConfigPull,
}
}
func commandConfigPull(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandConfigPull(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
cl, err := ce.GetNhostClient(cCtx.Context)
cl, err := ce.GetNhostClient(ctx)
if err != nil {
return fmt.Errorf("failed to get nhost client: %w", err)
}
appID, err := getAppIDFromServiceID(cCtx.Context, cl, cCtx.String(flagServiceID))
appID, err := getAppIDFromServiceID(ctx, cl, cmd.String(flagServiceID))
if err != nil {
return err
}
resp, err := cl.GetRunServiceConfigRawJSON(
cCtx.Context,
ctx,
appID,
cCtx.String(flagServiceID),
cmd.String(flagServiceID),
false,
)
if err != nil {
@@ -64,7 +65,7 @@ func commandConfigPull(cCtx *cli.Context) error {
return fmt.Errorf("failed to unmarshal config: %w", err)
}
if err := clienv.MarshalFile(v, cCtx.String(flagConfig), toml.Marshal); err != nil {
if err := clienv.MarshalFile(v, cmd.String(flagConfig), toml.Marshal); err != nil {
return fmt.Errorf("failed to save config to file: %w", err)
}

View File

@@ -1,13 +1,14 @@
package run
import (
"context"
"fmt"
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/project/env"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandConfigShow() *cli.Command {
@@ -23,19 +24,19 @@ func CommandConfigShow() *cli.Command {
Aliases: []string{},
Usage: "Service configuration file",
Value: "nhost-run-service.toml",
EnvVars: []string{"NHOST_RUN_SERVICE_CONFIG"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_CONFIG"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagOverlayName,
Usage: "If specified, apply this overlay",
EnvVars: []string{"NHOST_RUN_SERVICE_ID", "NHOST_SERVICE_OVERLAY_NAME"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_ID", "NHOST_SERVICE_OVERLAY_NAME"),
},
},
}
}
func commandConfigShow(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandConfigShow(_ context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
var secrets model.Secrets
if err := clienv.UnmarshalFile(ce.Path.Secrets(), &secrets, env.Unmarshal); err != nil {
@@ -47,8 +48,8 @@ func commandConfigShow(cCtx *cli.Context) error {
cfg, err := Validate(
ce,
cCtx.String(flagConfig),
cCtx.String(flagOverlayName),
cmd.String(flagConfig),
cmd.String(flagOverlayName),
secrets,
false,
)

View File

@@ -15,7 +15,7 @@ import (
"github.com/nhost/nhost/cli/nhostclient/graphql"
"github.com/nhost/nhost/cli/project/env"
"github.com/pelletier/go-toml/v2"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -35,17 +35,17 @@ func CommandConfigValidate() *cli.Command {
Aliases: []string{},
Usage: "Service configuration file",
Value: "nhost-run-service.toml",
EnvVars: []string{"NHOST_RUN_SERVICE_CONFIG"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_CONFIG"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagOverlayName,
Usage: "If specified, apply this overlay",
EnvVars: []string{"NHOST_SERVICE_OVERLAY_NAME"},
Sources: cli.EnvVars("NHOST_SERVICE_OVERLAY_NAME"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagServiceID,
Usage: "If specified, apply this overlay and remote secrets for this service",
EnvVars: []string{"NHOST_RUN_SERVICE_ID"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_ID"),
},
},
}
@@ -157,35 +157,35 @@ func getRemoteSecrets(
return respToSecrets(secretsResp.GetAppSecrets()), appID, nil
}
func commandConfigValidate(cCtx *cli.Context) error {
func commandConfigValidate(ctx context.Context, cmd *cli.Command) error {
var (
overlayName string
serviceID string
)
switch {
case cCtx.String(flagServiceID) != "" && cCtx.String(flagOverlayName) != "":
case cmd.String(flagServiceID) != "" && cmd.String(flagOverlayName) != "":
return errors.New("cannot specify both service id and overlay name") //nolint:err113
case cCtx.String(flagServiceID) != "":
serviceID = cCtx.String(flagServiceID)
case cmd.String(flagServiceID) != "":
serviceID = cmd.String(flagServiceID)
overlayName = serviceID
case cCtx.String(flagOverlayName) != "":
overlayName = cCtx.String(flagOverlayName)
case cmd.String(flagOverlayName) != "":
overlayName = cmd.String(flagOverlayName)
}
ce := clienv.FromCLI(cCtx)
ce := clienv.FromCLI(cmd)
var secrets model.Secrets
ce.Infoln("Getting secrets...")
if serviceID != "" {
cl, err := ce.GetNhostClient(cCtx.Context)
cl, err := ce.GetNhostClient(ctx)
if err != nil {
return fmt.Errorf("failed to get nhost client: %w", err)
}
secrets, _, err = getRemoteSecrets(cCtx.Context, cl, serviceID)
secrets, _, err = getRemoteSecrets(ctx, cl, serviceID)
if err != nil {
return err
}
@@ -202,7 +202,7 @@ func commandConfigValidate(cCtx *cli.Context) error {
if _, err := Validate(
ce,
cCtx.String(flagConfig),
cmd.String(flagConfig),
overlayName,
secrets,
false,

View File

@@ -1,13 +1,14 @@
package run
import (
"context"
"fmt"
"regexp"
"github.com/nhost/be/services/mimir/model"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/project/env"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -28,17 +29,17 @@ func CommandEnv() *cli.Command {
Aliases: []string{},
Usage: "Service configuration file",
Value: "nhost-run-service.toml",
EnvVars: []string{"NHOST_RUN_SERVICE_CONFIG"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_CONFIG"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagOverlayName,
Usage: "If specified, apply this overlay",
EnvVars: []string{"NHOST_RUN_SERVICE_ID", "NHOST_SERVICE_OVERLAY_NAME"},
Sources: cli.EnvVars("NHOST_RUN_SERVICE_ID", "NHOST_SERVICE_OVERLAY_NAME"),
},
&cli.BoolFlag{ //nolint:exhaustruct
Name: flagDevPrependExport,
Usage: "Prepend 'export' to each line",
EnvVars: []string{"NHOST_RuN_SERVICE_ENV_PREPEND_EXPORT"},
Sources: cli.EnvVars("NHOST_RuN_SERVICE_ENV_PREPEND_EXPORT"),
},
},
}
@@ -49,8 +50,8 @@ func escape(s string) string {
return re.ReplaceAllString(s, "\\$0")
}
func commandConfigDev(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandConfigDev(_ context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
var secrets model.Secrets
if err := clienv.UnmarshalFile(ce.Path.Secrets(), &secrets, env.Unmarshal); err != nil {
@@ -62,8 +63,8 @@ func commandConfigDev(cCtx *cli.Context) error {
cfg, err := Validate(
ce,
cCtx.String(flagConfig),
cCtx.String(flagOverlayName),
cmd.String(flagConfig),
cmd.String(flagOverlayName),
secrets,
false,
)
@@ -73,7 +74,7 @@ func commandConfigDev(cCtx *cli.Context) error {
for _, v := range cfg.GetEnvironment() {
value := escape(v.Value)
if cCtx.Bool(flagDevPrependExport) {
if cmd.Bool(flagDevPrependExport) {
ce.Println("export %s=\"%s\"", v.Name, value)
} else {
ce.Println("%s=\"%s\"", v.Name, value)

View File

@@ -1,13 +1,13 @@
package run
import "github.com/urfave/cli/v2"
import "github.com/urfave/cli/v3"
func Command() *cli.Command {
return &cli.Command{ //nolint:exhaustruct
Name: "run",
Aliases: []string{},
Usage: "Perform operations on Nhost Run",
Subcommands: []*cli.Command{
Commands: []*cli.Command{
CommandConfigShow(),
CommandConfigDeploy(),
CommandConfigEdit(),

View File

@@ -1,11 +1,12 @@
package secrets //nolint:dupl
import (
"context"
"errors"
"fmt"
"github.com/nhost/nhost/cli/clienv"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandCreate() *cli.Command {
@@ -19,28 +20,28 @@ func CommandCreate() *cli.Command {
}
}
func commandCreate(cCtx *cli.Context) error {
if cCtx.NArg() != 2 { //nolint:mnd
func commandCreate(ctx context.Context, cmd *cli.Command) error {
if cmd.NArg() != 2 { //nolint:mnd
return errors.New("invalid number of arguments") //nolint:err113
}
ce := clienv.FromCLI(cCtx)
ce := clienv.FromCLI(cmd)
proj, err := ce.GetAppInfo(cCtx.Context, cCtx.String(flagSubdomain))
proj, err := ce.GetAppInfo(ctx, cmd.String(flagSubdomain))
if err != nil {
return fmt.Errorf("failed to get app info: %w", err)
}
cl, err := ce.GetNhostClient(cCtx.Context)
cl, err := ce.GetNhostClient(ctx)
if err != nil {
return fmt.Errorf("failed to get nhost client: %w", err)
}
if _, err := cl.CreateSecret(
cCtx.Context,
ctx,
proj.ID,
cCtx.Args().Get(0),
cCtx.Args().Get(1),
cmd.Args().Get(0),
cmd.Args().Get(1),
); err != nil {
return fmt.Errorf("failed to create secret: %w", err)
}

View File

@@ -1,11 +1,12 @@
package secrets
import (
"context"
"errors"
"fmt"
"github.com/nhost/nhost/cli/clienv"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandDelete() *cli.Command {
@@ -19,27 +20,27 @@ func CommandDelete() *cli.Command {
}
}
func commandDelete(cCtx *cli.Context) error {
if cCtx.NArg() != 1 {
func commandDelete(ctx context.Context, cmd *cli.Command) error {
if cmd.NArg() != 1 {
return errors.New("invalid number of arguments") //nolint:err113
}
ce := clienv.FromCLI(cCtx)
ce := clienv.FromCLI(cmd)
proj, err := ce.GetAppInfo(cCtx.Context, cCtx.String(flagSubdomain))
proj, err := ce.GetAppInfo(ctx, cmd.String(flagSubdomain))
if err != nil {
return fmt.Errorf("failed to get app info: %w", err)
}
cl, err := ce.GetNhostClient(cCtx.Context)
cl, err := ce.GetNhostClient(ctx)
if err != nil {
return fmt.Errorf("failed to get nhost client: %w", err)
}
if _, err := cl.DeleteSecret(
cCtx.Context,
ctx,
proj.ID,
cCtx.Args().Get(0),
cmd.Args().Get(0),
); err != nil {
return fmt.Errorf("failed to delete secret: %w", err)
}

View File

@@ -1,10 +1,11 @@
package secrets
import (
"context"
"fmt"
"github.com/nhost/nhost/cli/clienv"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandList() *cli.Command {
@@ -17,21 +18,21 @@ func CommandList() *cli.Command {
}
}
func commandList(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandList(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
proj, err := ce.GetAppInfo(cCtx.Context, cCtx.String(flagSubdomain))
proj, err := ce.GetAppInfo(ctx, cmd.String(flagSubdomain))
if err != nil {
return fmt.Errorf("failed to get app info: %w", err)
}
cl, err := ce.GetNhostClient(cCtx.Context)
cl, err := ce.GetNhostClient(ctx)
if err != nil {
return fmt.Errorf("failed to get nhost client: %w", err)
}
secrets, err := cl.GetSecrets(
cCtx.Context,
ctx,
proj.ID,
)
if err != nil {

View File

@@ -1,6 +1,6 @@
package secrets
import "github.com/urfave/cli/v2"
import "github.com/urfave/cli/v3"
const flagSubdomain = "subdomain"
@@ -9,7 +9,7 @@ func commonFlags() []cli.Flag {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagSubdomain,
Usage: "Project's subdomain to operate on, defaults to linked project",
EnvVars: []string{"NHOST_SUBDOMAIN"},
Sources: cli.EnvVars("NHOST_SUBDOMAIN"),
},
}
}
@@ -19,7 +19,7 @@ func Command() *cli.Command {
Name: "secrets",
Aliases: []string{},
Usage: "Manage secrets",
Subcommands: []*cli.Command{
Commands: []*cli.Command{
CommandCreate(),
CommandDelete(),
CommandList(),

View File

@@ -1,11 +1,12 @@
package secrets //nolint:dupl
import (
"context"
"errors"
"fmt"
"github.com/nhost/nhost/cli/clienv"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandUpdate() *cli.Command {
@@ -19,28 +20,28 @@ func CommandUpdate() *cli.Command {
}
}
func commandUpdate(cCtx *cli.Context) error {
if cCtx.NArg() != 2 { //nolint:mnd
func commandUpdate(ctx context.Context, cmd *cli.Command) error {
if cmd.NArg() != 2 { //nolint:mnd
return errors.New("invalid number of arguments") //nolint:err113
}
ce := clienv.FromCLI(cCtx)
ce := clienv.FromCLI(cmd)
proj, err := ce.GetAppInfo(cCtx.Context, cCtx.String(flagSubdomain))
proj, err := ce.GetAppInfo(ctx, cmd.String(flagSubdomain))
if err != nil {
return fmt.Errorf("failed to get app info: %w", err)
}
cl, err := ce.GetNhostClient(cCtx.Context)
cl, err := ce.GetNhostClient(ctx)
if err != nil {
return fmt.Errorf("failed to get nhost client: %w", err)
}
if _, err := cl.UpdateSecret(
cCtx.Context,
ctx,
proj.ID,
cCtx.Args().Get(0),
cCtx.Args().Get(1),
cmd.Args().Get(0),
cmd.Args().Get(1),
); err != nil {
return fmt.Errorf("failed to update secret: %w", err)
}

View File

@@ -1,6 +1,6 @@
package software
import "github.com/urfave/cli/v2"
import "github.com/urfave/cli/v3"
const (
devVersion = "dev"
@@ -11,7 +11,7 @@ func Command() *cli.Command {
Name: "sw",
Aliases: []string{},
Usage: "Perform software management operations",
Subcommands: []*cli.Command{
Commands: []*cli.Command{
CommandUninstall(),
CommandUpgrade(),
CommandVersion(),

View File

@@ -1,11 +1,12 @@
package software
import (
"context"
"fmt"
"os"
"github.com/nhost/nhost/cli/clienv"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -22,29 +23,29 @@ func CommandUninstall() *cli.Command {
&cli.BoolFlag{ //nolint:exhaustruct
Name: forceFlag,
Usage: "Force uninstall without confirmation",
EnvVars: []string{"NHOST_FORCE_UNINSTALL"},
Sources: cli.EnvVars("NHOST_FORCE_UNINSTALL"),
DefaultText: "false",
},
},
}
}
func commandUninstall(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandUninstall(_ context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
path, err := os.Executable()
if err != nil {
return fmt.Errorf("failed to find installed CLI: %w", err)
}
if cCtx.App.Version == devVersion || cCtx.App.Version == "" {
if cmd.Root().Version == devVersion || cmd.Root().Version == "" {
// we fake it in dev mode
path = "/tmp/nhost"
}
ce.Infoln("Found Nhost cli in %s", path)
if !cCtx.Bool(forceFlag) {
if !cmd.Bool(forceFlag) {
ce.PromptMessage("Are you sure you want to uninstall Nhost CLI? [y/N] ")
resp, err := ce.PromptInput(false)

View File

@@ -1,14 +1,18 @@
package software
import (
"context"
"errors"
"fmt"
"io"
"os"
"runtime"
"strings"
"syscall"
"github.com/nhost/nhost/cli/clienv"
"github.com/nhost/nhost/cli/software"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandUpgrade() *cli.Command {
@@ -20,12 +24,12 @@ func CommandUpgrade() *cli.Command {
}
}
func commandUpgrade(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandUpgrade(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
mgr := software.NewManager()
releases, err := mgr.GetReleases(cCtx.Context, cCtx.App.Version)
releases, err := mgr.GetReleases(ctx, cmd.Root().Version)
if err != nil {
return fmt.Errorf("failed to get releases: %w", err)
}
@@ -36,7 +40,7 @@ func commandUpgrade(cCtx *cli.Context) error {
}
latest := releases[0]
if latest.TagName == cCtx.App.Version {
if latest.TagName == cmd.Root().Version {
ce.Infoln("You have the latest version. Hurray!")
return nil
}
@@ -71,28 +75,28 @@ func commandUpgrade(cCtx *cli.Context) error {
defer os.Remove(tmpFile.Name())
defer tmpFile.Close()
if err := mgr.DownloadAsset(cCtx.Context, url, tmpFile); err != nil {
if err := mgr.DownloadAsset(ctx, url, tmpFile); err != nil {
return fmt.Errorf("failed to download asset: %w", err)
}
return install(cCtx, ce, tmpFile.Name())
return install(cmd, ce, tmpFile.Name())
}
func install(cCtx *cli.Context, ce *clienv.CliEnv, tmpFile string) error {
func install(cmd *cli.Command, ce *clienv.CliEnv, tmpFile string) error {
curBin, err := os.Executable()
if err != nil {
return fmt.Errorf("failed to find installed CLI: %w", err)
}
if cCtx.App.Version == devVersion || cCtx.App.Version == "" {
if cmd.Root().Version == devVersion || cmd.Root().Version == "" {
// we are in dev mode, we fake curBin for testing
curBin = "/tmp/nhost"
}
ce.Infoln("Copying to %s...", curBin)
if err := os.Rename(tmpFile, curBin); err != nil {
return fmt.Errorf("failed to rename %s to %s: %w", tmpFile, curBin, err)
if err := moveOrCopyFile(tmpFile, curBin); err != nil {
return fmt.Errorf("failed to move %s to %s: %w", tmpFile, curBin, err)
}
ce.Infoln("Setting permissions...")
@@ -103,3 +107,55 @@ func install(cCtx *cli.Context, ce *clienv.CliEnv, tmpFile string) error {
return nil
}
func moveOrCopyFile(src, dst string) error {
if err := os.Rename(src, dst); err != nil {
var linkErr *os.LinkError
// this happens when moving across different filesystems
if errors.As(err, &linkErr) && errors.Is(linkErr.Err, syscall.EXDEV) {
if err := hardMove(src, dst); err != nil {
return fmt.Errorf("failed to hard move: %w", err)
}
return nil
}
return fmt.Errorf("failed to rename: %w", err)
}
return nil
}
func hardMove(src, dst string) error {
srcFile, err := os.Open(src)
if err != nil {
return fmt.Errorf("failed to open source file: %w", err)
}
defer srcFile.Close()
dstFile, err := os.Create(dst)
if err != nil {
return fmt.Errorf("failed to create destination file: %w", err)
}
defer dstFile.Close()
if _, err := io.Copy(dstFile, srcFile); err != nil {
return fmt.Errorf("failed to copy file contents: %w", err)
}
fi, err := os.Stat(src)
if err != nil {
return fmt.Errorf("failed to stat source file: %w", err)
}
err = os.Chmod(dst, fi.Mode())
if err != nil {
return fmt.Errorf("failed to set file permissions: %w", err)
}
if err := os.Remove(src); err != nil {
return fmt.Errorf("failed to remove source file: %w", err)
}
return nil
}

View File

@@ -12,7 +12,7 @@ import (
"github.com/nhost/nhost/cli/nhostclient/graphql"
"github.com/nhost/nhost/cli/project/env"
"github.com/nhost/nhost/cli/software"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
func CommandVersion() *cli.Command {
@@ -111,11 +111,11 @@ func CheckVersions(
checkServiceVersion(
ce, graphql.SoftwareTypeEnumAuth, *cfg.GetAuth().GetVersion(), swv,
"https://github.com/nhost/hasura-auth/releases",
"https://github.com/nhost/nhost/releases",
)
checkServiceVersion(
ce, graphql.SoftwareTypeEnumStorage, *cfg.GetStorage().GetVersion(), swv,
"https://github.com/nhost/hasura-storage/releases",
"https://github.com/nhost/nhost/releases",
)
checkServiceVersion(
ce, graphql.SoftwareTypeEnumPostgreSQL, *cfg.GetPostgres().GetVersion(), swv,
@@ -132,8 +132,8 @@ func CheckVersions(
return checkCLIVersion(ctx, ce, appVersion)
}
func commandVersion(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandVersion(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
var (
cfg *model.ConfigConfig
@@ -157,5 +157,5 @@ func commandVersion(cCtx *cli.Context) error {
ce.Warnln("🟡 No Nhost project found")
}
return CheckVersions(cCtx.Context, ce, cfg, cCtx.App.Version)
return CheckVersions(ctx, ce, cfg, cmd.Root().Version)
}

View File

@@ -1,8 +1,10 @@
package user
import (
"context"
"github.com/nhost/nhost/cli/clienv"
"github.com/urfave/cli/v2"
"github.com/urfave/cli/v3"
)
const (
@@ -21,26 +23,26 @@ func CommandLogin() *cli.Command {
&cli.StringFlag{ //nolint:exhaustruct
Name: flagPAT,
Usage: "Use this Personal Access Token instead of generating a new one with your email/password",
EnvVars: []string{"NHOST_PAT"},
Sources: cli.EnvVars("NHOST_PAT"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagEmail,
Usage: "Email address",
EnvVars: []string{"NHOST_EMAIL"},
Sources: cli.EnvVars("NHOST_EMAIL"),
},
&cli.StringFlag{ //nolint:exhaustruct
Name: flagPassword,
Usage: "Password",
EnvVars: []string{"NHOST_PASSWORD"},
Sources: cli.EnvVars("NHOST_PASSWORD"),
},
},
}
}
func commandLogin(cCtx *cli.Context) error {
ce := clienv.FromCLI(cCtx)
func commandLogin(ctx context.Context, cmd *cli.Command) error {
ce := clienv.FromCLI(cmd)
_, err := ce.Login(
cCtx.Context, cCtx.String(flagPAT), cCtx.String(flagEmail), cCtx.String(flagPassword),
ctx, cmd.String(flagPAT), cmd.String(flagEmail), cmd.String(flagPassword),
)
return err //nolint:wrapcheck

View File

@@ -41,13 +41,13 @@ func auth( //nolint:funlen
envars, err := appconfig.HasuraAuthEnv(
cfg,
"http://graphql:8080/v1/graphql",
URL(subdomain, "auth", httpPort, useTLS)+"/v1",
URL(subdomain, "auth", httpPort, useTLS && exposePort == 0)+"/v1",
"postgres://nhost_hasura@postgres:5432/local",
"postgres://nhost_auth_admin@postgres:5432/local",
&model.ConfigSmtp{
User: "user",
Password: "password",
Sender: "hasura-auth@example.com",
Sender: "auth@example.com",
Host: "mailhog",
Port: 1025, //nolint:mnd
Secure: false,
@@ -56,6 +56,7 @@ func auth( //nolint:funlen
false,
false,
"00000000-0000-0000-0000-000000000000",
"5181f67e2844e4b60d571fa346cac9c37fc00d1ff519212eae6cead138e639ba",
)
if err != nil {
return nil, fmt.Errorf("failed to get hasura env vars: %w", err)
@@ -67,7 +68,7 @@ func auth( //nolint:funlen
}
svc := &Service{
Image: "nhost/hasura-auth:" + *cfg.Auth.Version,
Image: "nhost/auth:" + *cfg.Auth.Version,
DependsOn: map[string]DependsOn{
"graphql": {
Condition: "service_healthy",

View File

@@ -10,7 +10,7 @@ import (
func expectedAuth() *Service {
//nolint:lll
return &Service{
Image: "nhost/hasura-auth:0.31.0",
Image: "nhost/auth:0.31.0",
Command: nil,
DependsOn: map[string]DependsOn{
"graphql": {Condition: "service_healthy"},
@@ -33,6 +33,7 @@ func expectedAuth() *Service {
"AUTH_DISABLE_SIGNUP": "false",
"AUTH_EMAIL_PASSWORDLESS_ENABLED": "true",
"AUTH_EMAIL_SIGNIN_EMAIL_VERIFIED_REQUIRED": "true",
"AUTH_ENCRYPTION_KEY": "5181f67e2844e4b60d571fa346cac9c37fc00d1ff519212eae6cead138e639ba",
"AUTH_GRAVATAR_DEFAULT": "gravatarDefault",
"AUTH_GRAVATAR_ENABLED": "true",
"AUTH_GRAVATAR_RATING": "gravatarRating",
@@ -52,6 +53,7 @@ func expectedAuth() *Service {
"AUTH_PROVIDER_APPLE_ENABLED": "true",
"AUTH_PROVIDER_APPLE_KEY_ID": "appleKeyId",
"AUTH_PROVIDER_APPLE_PRIVATE_KEY": "applePrivateKey",
"AUTH_PROVIDER_APPLE_SCOPE": "",
"AUTH_PROVIDER_APPLE_TEAM_ID": "appleTeamId",
"AUTH_PROVIDER_AZUREAD_CLIENT_ID": "azureadClientId",
"AUTH_PROVIDER_AZUREAD_CLIENT_SECRET": "azureadClientSecret",
@@ -74,9 +76,12 @@ func expectedAuth() *Service {
"AUTH_PROVIDER_FACEBOOK_CLIENT_SECRET": "facebookClientSecret",
"AUTH_PROVIDER_FACEBOOK_ENABLED": "true",
"AUTH_PROVIDER_FACEBOOK_SCOPE": "email",
"AUTH_PROVIDER_GITHUB_AUDIENCE": "audience",
"AUTH_PROVIDER_GITHUB_CLIENT_ID": "githubClientId",
"AUTH_PROVIDER_GITHUB_CLIENT_SECRET": "githubClientSecret",
"AUTH_PROVIDER_GITHUB_ENABLED": "true",
"AUTH_PROVIDER_GITHUB_SCOPE": "user:email",
"AUTH_PROVIDER_GITLAB_AUDIENCE": "audience",
"AUTH_PROVIDER_GITLAB_CLIENT_ID": "gitlabClientId",
"AUTH_PROVIDER_GITLAB_CLIENT_SECRET": "gitlabClientSecret",
"AUTH_PROVIDER_GITLAB_ENABLED": "true",
@@ -96,6 +101,7 @@ func expectedAuth() *Service {
"AUTH_PROVIDER_SPOTIFY_CLIENT_SECRET": "spotifyClientSecret",
"AUTH_PROVIDER_SPOTIFY_ENABLED": "true",
"AUTH_PROVIDER_SPOTIFY_SCOPE": "user-read-email",
"AUTH_PROVIDER_STRAVA_AUDIENCE": "audience",
"AUTH_PROVIDER_STRAVA_CLIENT_ID": "stravaClientId",
"AUTH_PROVIDER_STRAVA_CLIENT_SECRET": "stravaClientSecret",
"AUTH_PROVIDER_STRAVA_ENABLED": "true",
@@ -132,7 +138,7 @@ func expectedAuth() *Service {
"AUTH_RATE_LIMIT_SMS_INTERVAL": "5m",
"AUTH_REFRESH_TOKEN_EXPIRES_IN": "99",
"AUTH_REQUIRE_ELEVATED_CLAIM": "required",
"AUTH_SERVER_URL": "http://dev.auth.local.nhost.run:1336/v1",
"AUTH_SERVER_URL": "https://dev.auth.local.nhost.run:1336/v1",
"AUTH_SMS_PASSWORDLESS_ENABLED": "true",
"AUTH_SMS_PROVIDER": "twilio",
"AUTH_SMS_TWILIO_ACCOUNT_SID": "smsAccountSid",
@@ -143,7 +149,7 @@ func expectedAuth() *Service {
"AUTH_SMTP_PASS": "password",
"AUTH_SMTP_PORT": "1025",
"AUTH_SMTP_SECURE": "false",
"AUTH_SMTP_SENDER": "hasura-auth@example.com",
"AUTH_SMTP_SENDER": "auth@example.com",
"AUTH_SMTP_USER": "user",
"AUTH_USER_DEFAULT_ALLOWED_ROLES": "user,admin",
"AUTH_USER_DEFAULT_ROLE": "user",
@@ -186,7 +192,7 @@ func expectedAuth() *Service {
"traefik.http.routers.auth.entrypoints": "web",
"traefik.http.routers.auth.rule": "(HostRegexp(`^.+\\.auth\\.local\\.nhost\\.run$`) || Host(`local.auth.nhost.run`))",
"traefik.http.routers.auth.service": "auth",
"traefik.http.routers.auth.tls": "false",
"traefik.http.routers.auth.tls": "true",
"traefik.http.services.auth.loadbalancer.server.port": "4000",
},
Ports: nil,
@@ -216,7 +222,7 @@ func TestAuth(t *testing.T) {
{
name: "default",
cfg: getConfig,
useTlS: false,
useTlS: true,
exposePort: 0,
expected: expectedAuth,
},
@@ -227,11 +233,11 @@ func TestAuth(t *testing.T) {
cfg.Auth.Version = ptr("0.21.3")
return cfg
},
useTlS: false,
useTlS: true,
exposePort: 0,
expected: func() *Service {
svc := expectedAuth()
svc.Image = "nhost/hasura-auth:0.21.3"
svc.Image = "nhost/auth:0.21.3"
svc.Labels["traefik.http.middlewares.replace-auth.replacepathregex.regex"] = "/v1(/|$$)(.*)"
svc.Labels["traefik.http.middlewares.replace-auth.replacepathregex.replacement"] = "/$$2"
svc.Labels["traefik.http.routers.auth.middlewares"] = "replace-auth"
@@ -243,7 +249,7 @@ func TestAuth(t *testing.T) {
{
name: "custom port",
cfg: getConfig,
useTlS: false,
useTlS: true,
exposePort: 8080,
expected: func() *Service {
svc := expectedAuth()

View File

@@ -250,7 +250,7 @@ func traefik(subdomain, projectName string, port uint, dotnhostfolder string) (*
}
return &Service{
Image: "traefik:v3.1",
Image: "traefik:v3.6",
DependsOn: nil,
EntryPoint: nil,
Command: []string{
@@ -344,7 +344,7 @@ func dashboard(
subdomain, "hasura", httpPort, useTLS,
) + "/console",
"NEXT_PUBLIC_NHOST_HASURA_MIGRATIONS_API_URL": URL(
subdomain, "hasura", httpPort, useTLS),
subdomain, "hasura", httpPort, useTLS) + "/apis/migrate",
"NEXT_PUBLIC_NHOST_STORAGE_URL": URL(
subdomain, "storage", httpPort, useTLS) + "/v1",
},
@@ -459,7 +459,7 @@ func mailhog(subdomain, volumeName string, useTLS bool) *Service {
"SMTP_PASS": "password",
"SMTP_PORT": "1025",
"SMTP_SECURE": "false",
"SMTP_SENDER": "hasura-auth@example.com",
"SMTP_SENDER": "auth@example.com",
"SMTP_USER": "user",
},
ExtraHosts: extraHosts(subdomain),

View File

@@ -49,7 +49,7 @@ func storage( //nolint:funlen
}
return &Service{
Image: "nhost/hasura-storage:" + *cfg.GetStorage().GetVersion(),
Image: "nhost/storage:" + *cfg.GetStorage().GetVersion(),
DependsOn: map[string]DependsOn{
"minio": {
Condition: "service_started",

View File

@@ -9,7 +9,7 @@ import (
func expectedStorage() *Service {
return &Service{
Image: "nhost/hasura-storage:0.2.5",
Image: "nhost/storage:0.2.5",
DependsOn: map[string]DependsOn{
"graphql": {Condition: "service_healthy"},
"minio": {Condition: "service_started"},

Some files were not shown because too many files have changed in this diff Show More