Breaking changes
- Support multiple domains for tenant: There's an option to automatically associated a user to a tenant based on the user's email domain. Sometimes the same tenant can 'accept' multiple domains - so that's supported now!
Please notice that this breaks compilation - considering this value is now an array and not a string.
Enhancements
- Appending user login IDs: We've added the option to assign multiple login IDs to a user, using the
additionalLoginIDs
attribute, upon creation and/or invitation of the user. - First, middle and last names of a user: We added system attributes for first (
givenName
), middle (middleName
) and last (familyName
) of a user. - Check roles or permissions of a user: Check if the user has at least one of the roles in a provided list, using the
getMatchedRoles
function. This also applies for checking permissions (getMatchedPermissions
), and also for checking the existence on a project level and a specific tenant level (getMatchedTenantRoles
,getMatchedTenantPermissions
). - Set the user's roles: We now support the option to set an existing user's roles. Instead of fetching existing roles, removing all of them and adding new ones 'from scratch' - use the
setRoles
user function. - Setting custom claims for test users: You can now pass the
LoginOptions
object when working with test users, such as when using thegenerateMagicLinkForTestUser
function. - Documentation enhancements: Additional explanations were added to our SDK's README and examples, specifically around errors.
Bug fixes
- Cross-fetch support: Some services, such as Cloudflare, don't support all
fetch
capabilities. This is now fixed and such edge runtimes can work smoothly. Thank you @mattolson for the contribution!