File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
packages/auth-providers/dbAuth/api/src Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change
1
+ - chore(dbAuth): restore behavior of checking whether a search query is present
2
+
3
+ Previously dbAuth would check whether or not query string variables were
4
+ present at all before invoking the proper function. During a refactor we
5
+ updated this code to assume a query would * always* be present. Which it would be
6
+ during normal browser behavior. But, we had a complaint from a user who relied
7
+ on this optional check in one of their tests. So we're restoring the optional
8
+ check here.
Original file line number Diff line number Diff line change @@ -1456,7 +1456,7 @@ export class DbAuthHandler<
1456
1456
// figure out which auth method we're trying to call
1457
1457
async _getAuthMethod ( ) {
1458
1458
// try getting it from the query string, /.redwood/functions/auth?method=[methodName]
1459
- let methodName = this . normalizedRequest . query . method as AuthMethodNames
1459
+ let methodName = this . normalizedRequest . query ? .method as AuthMethodNames
1460
1460
1461
1461
if (
1462
1462
! DbAuthHandler . METHODS . includes ( methodName ) &&
You can’t perform that action at this time.
0 commit comments