-
Notifications
You must be signed in to change notification settings - Fork 110
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
Added configurationBaseURL
option for Custom Domains support
#505
Conversation
4ed7306
to
3c525b6
Compare
Added `configurationBase` convenience setter Added Tests
3c525b6
to
938a949
Compare
var configurationBase: String? { | ||
get { | ||
guard let url = self.configurationBaseURL else { return nil } | ||
return url.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.
Those two lines can be shortened to return self.configurationBaseURL?.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.
Sure could, this is for clarity.
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.
TBH I find it more clear (not knowing swift) with a single line. But it's up to you @cocojoe .
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.
fine as it is
Lock/OptionBuildable.swift
Outdated
return url.absoluteString | ||
} | ||
set { | ||
guard let value = newValue, let url = URL(string: value) else { return } // FIXME: log error |
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's a FIXME here. Are you going to add it in this PR?
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.
Don't feel these are relevant anymore tbh
LockTests/OptionsSpec.swift
Outdated
@@ -256,6 +259,11 @@ class OptionsSpec: QuickSpec { | |||
expect(options.supportURL?.absoluteString) == "https://auth0.com/docs" | |||
} | |||
|
|||
it("should set baseURL") { |
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.
please use configurationBaseURL instead (like in the other test)
var configurationBase: String? { | ||
get { | ||
guard let url = self.configurationBaseURL else { return nil } | ||
return url.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.
TBH I find it more clear (not knowing swift) with a single line. But it's up to you @cocojoe .
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.
👨🎓
Fixes #504