-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for subpaths in Auth0 domain [SDK-2963] #557
Conversation
@@ -1,20 +1,17 @@ | |||
import Foundation | |||
|
|||
public extension URL { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the breaking change.
Auth0Tests/ClaimValidatorsSpec.swift
Outdated
@@ -66,7 +66,7 @@ class ClaimValidatorsSpec: IDTokenValidatorBaseSpec { | |||
describe("iss validation") { | |||
|
|||
var issValidator: IDTokenIssValidator! | |||
let expectedIss = "\(URL.a0_url(domain).absoluteString)/" | |||
let expectedIss = "\(URL.httpsURL(from: domain).absoluteString)/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that it's breaking any of your tests, but this will end in //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I'll look into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the extra /
in 68be1ea.
Changes
This PR adds support for subpaths in the Auth0 domain, by removing the leading slash from all the paths and adding a trailing slash to the base URL.
References
Fixes #545
Testing
Unit tests have been added, and the changes were also tested manually (for Web Auth only) with an iOS 15.0 emulator (iPhone 13) and macOS 11.6.1, using the respective playground apps.
Checklist