auth0 / Auth0.swift

Auth0 SDK for Apple platforms
https://auth0.github.io/Auth0.swift
MIT License
345 stars 225 forks source link

Add support for validating the `org_name` claim [SDK-4414] #782

Closed Widcket closed 1 year ago

Widcket commented 1 year ago

📋 Changes

This PR adds a new ID token claim validator, IDTokenOrgNameValidator, which is only used if the organization value passed on login does not start with org_ (meaning, it's not an organization ID). Otherwise, the existing IDTokenOrgIDValidator is used instead.

🎯 Testing

Besides adding unit tests, the changes were tested manually using a simulator running iOS 17.0, with Xcode 14.3 (14E222b).

stevehobbsdev commented 1 year ago

LGTM - anything we want to update in EXAMPLES.md around Organizations? e.g. the sample in there refers to YOUR_AUTH0_ORGANIZATION_ID specifically, I've seen others change similar examples to something like YOUR_AUTH0_ORGANIZATION_ID_OR_NAME.

Widcket commented 1 year ago

@stevehobbsdev Good catch! Added it in https://github.com/auth0/Auth0.swift/pull/782/commits/e7263c3509029117b6d9e52745da914ce570280f