Commit 71acf22
authored
Skip invalidating auth config when toggling security email notification in template editor page (supabase#44888)
## Context
Preferred fix to this PR
[here](supabase#44886)
On a security email template page (e.g. Reauthentication), if you edit
the Subject or Body without saving, then toggle **Enable notification**
in the Configuration card and click **Save changes**, the Content edits
are reverted to the last saved values.
## Changes involved
Opting to not invalidate the `authConfig` RQ cache on a successful
mutation when toggling the security email notification while on the
template editor page
## To test
- [ ] Open a security email template
- [ ] Make some changes to the template without saving
- [ ] Toggle the notification and save
- [ ] Ensure that the template changes are still present and not
reverted
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Optimized query cache handling for authentication configuration
updates to reduce unnecessary refresh operations.
* Enhanced type safety for form submissions in authentication settings
to prevent data validation errors.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent 5715334 commit 71acf22
2 files changed
Lines changed: 6 additions & 4 deletions
File tree
- apps/studio
- data/auth
- pages/project/[ref]/auth/templates
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
| 45 | + | |
45 | 46 | | |
46 | | - | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
0 commit comments