Skip to content

Fixes #789 - email_verified can be a string or boolean#831

Closed
timgates42 wants to merge 4 commits intoauth0:masterfrom
timgates42:master
Closed

Fixes #789 - email_verified can be a string or boolean#831
timgates42 wants to merge 4 commits intoauth0:masterfrom
timgates42:master

Conversation

@timgates42
Copy link
Copy Markdown

Add extra types so a non-empty string is treated as true but an empty string is treated as false

Changes

What is changing and why this is important:

  • The schema for the user response has been adjusted to allow either string or boolean, this is necessary due to a work around needed for SAML SSO coming from Microsoft Entra to map a truthy value to email_verified which is the users email address.

References

Rrelevant links supporting this change:

Testing

This item can be tested by setting up a SAML connection where the email_verified is mapped to the email field and then retrieving the user details for a user that logs in over this connection.

Checklist

colinlowther and others added 3 commits April 28, 2026 15:30
Add extra types so a non-empty string is treated as true but an empty
string is treated as false
@timgates42 timgates42 requested a review from a team as a code owner April 28, 2026 06:53
@timgates42 timgates42 changed the title [Fixes: #789] email_verified can be a string or boolean [Fixes #789] email_verified can be a string or boolean Apr 28, 2026
@timgates42 timgates42 changed the title [Fixes #789] email_verified can be a string or boolean Fixes #789 - email_verified can be a string or boolean Apr 28, 2026
@timgates42
Copy link
Copy Markdown
Author

Fixes #789

The linter finally got its way. Import ordering across the authentication
and management modules was brought into line with ruff's expectations,
because apparently alphabetical order is the hill we die on. Blank lines
that contributed nothing but existential whitespace were also removed.
Nobody mourned them. 🪦

The pre-commit configuration was migrated from remote repository hooks to
local system-level hooks for both ruff and ggshield. This means builds
no longer depend on fetching specific tagged versions from GitHub at hook
install time — the locally installed tools are used directly instead.
One less thing to break on a Monday morning. 🔧

A minor formatting adjustment landed in the UserResponseSchema where a
long pydantic.Field call was wrapped to respect line length limits. The
.gitignore also picked up an entry for error.txt and had its missing
trailing newline restored, because even config files deserve a proper
ending. 📝

Test files received the same import-sorting treatment. No logic changed,
no assertions were harmed — just imports shuffled into the order the
linter demanded. The tests still pass, the code still works, and the
diff is mostly whitespace. Such is the life of a codebase under the
watchful eye of automated formatting. 🤖

Signed-off-by: Tim Gates <tim.gates@iress.com>
@kishore7snehil
Copy link
Copy Markdown
Contributor

@timgates42 Thanks for the PR. The underlying issue is valid, SAML connections can return a string for email_verified. However, this file is auto-generated by Fern from our OpenAPI spec and will be overwritten on the next SDK regeneration. We're tracking this as an API spec issue to get the type corrected at the source. Once the spec is updated, Fern will generate the correct type natively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants