Stytch allows users to be created with a + in the email, such as frank+testing@example.com
. These users are treated separately from their counterparts without a +, like frank@example.com
.
The search users backend endpoint, however, is not matching on any user with a + in the email using either an email_address
or email_address_fuzzy
filter. Is this intentionally inconsistent behavior?
Hey Andrew - thanks for posting!
Would you mind sharing an example request body for a User Search request that you’d expect to return an email with a + modifier, but isn’t? Feel free to swap out the email addresses with those example ones.
Looking into our User Search endpoint behavior with + modifiers on my end, I’m noticing the following:
- Searching on the
email_address
operand using an email with a + modifier, frank+testing@example.com
, does return the user frank+testing@example.com
- Searching on the
email_address_fuzzy
operand with the email address (and no domain), frank+testing
or frank
, also returns the user frank+testing@example.com
- Searching on either
email_address
or email_address_fuzzy
with frank@example.com
does not return the user frank+testing@example.com
Let me know whether this matches the behavior you’re seeing (or expecting) and we’ll investigate further!
Cheers,
Matt
Stytch Support
Hey Matt,
I was building the query with the Go SDK like so:
searchResponse, errSearch := client.Users.Search(ctx, &stytch.UsersSearchParams{
Query: &stytch.UsersSearchQuery{
Operator: stytch.UserSearchOperatorAND,
Operands: []json.Marshaler{
stytch.UsersSearchQueryEmailAddressFilter{EmailAddresses: []string{
email,
}},
},
},
})
I’m not sure what has changed since yesterday, but the query is now working as expected.
Thanks for your response.
Hey Andrew,
No problem - I’m glad to hear everything is working as expected now! If you run into that behavior again please let us know and we’ll take another look!
Cheers,
Matt
Stytch Support