Commit 972d056
committed
fix(clerk-js): If password is enabled, instanceIsPasswordBased is true
The Clerk Dashboard now has improved support for enabling an instance
configuration with password enabled, but not required. Such a
configuration makes passwords optional on sign-up, allows users to add
them to accounts, and allows users to use them for sign-in. Previously,
passwords were both enabled and required together.
If the instance is configured with password enabled but not required,
the SDK should still treat the instance as password based. Modify
`UserSettings.instanceIsPasswordBased` to return true in this
configuration. This (a) makes sure that the password card is displayed
on the SecurityPage so that users can modify their passwords, and (b)
allows instant password sign in.
Fixes USER-3245. Tested with unit testing and with local Clerk.
Revised and simplified version of
#6592 which modifies
`UserSettings.instanceIsPasswordBased` instead of adding a new property.1 parent c3facf1 commit 972d056
File tree
5 files changed
+20
-5
lines changed- .changeset
- packages/clerk-js/src
- core/resources
- __tests__
- ui/components
- SignIn/__tests__
- UserProfile/__tests__
5 files changed
+20
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
78 | 90 | | |
79 | 91 | | |
80 | 92 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | | - | |
| 440 | + | |
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
| 35 | + | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| |||
0 commit comments