-
-
Notifications
You must be signed in to change notification settings - Fork 890
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
Enable Login v2 #2908
Enable Login v2 #2908
Conversation
Signed-off-by: Milen Pivchev <[email protected]>
Brand/NCBrand.swift
Outdated
@@ -68,7 +68,7 @@ let userAgent: String = { | |||
@objc public var use_themingColor: Bool = true | |||
@objc public var use_themingLogo: Bool = false | |||
@objc public var use_storeLocalAutoUploadAll: Bool = false | |||
@objc public var use_loginflowv2: Bool = false // Don't touch me !! | |||
@objc public var use_loginflowv2: Bool = true // Don't touch me !! |
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.
@marinofaggiana The plan is to use v2 by default from now on, and v1 will be obsolete with removal of oldest supported NC version. Maybe we can remove this? Not sure if the brander will break
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.
yes I created this switch years ago to test v2
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.
Is it ok to remove it?
Signed-off-by: Milen Pivchev <[email protected]>
Added the option to do the flow via external browser @tobiasKaminsky |
iOSClient/Login/NCLoginWeb.swift
Outdated
@@ -47,6 +47,9 @@ class NCLoginWeb: UIViewController { | |||
var loginFlowV2Endpoint = "" | |||
var loginFlowV2Login = "" | |||
|
|||
// Opens the login URL in external browser instead of in app. User must manually go back to the app. | |||
let loginFlowv2ExternalBrowser = false |
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.
@marinofaggiana Please test with this enabled and disabled
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
iOSClient/Login/NCLoginWeb.swift
Outdated
NextcloudKit.shared.getLoginFlowV2Poll(token: self.loginFlowV2Token, endpoint: self.loginFlowV2Endpoint) { server, loginName, appPassword, _, error in | ||
if error == .success, let server, let loginName, let appPassword { | ||
self.createAccount(server: server, username: loginName, password: appPassword) | ||
} |
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 stopped using NCLoginWeb
for v2 and this screen stopped appearing. Now we only use NCLogin
. NCLoginWeb
can be renamed to NCLoginProviders
as now only external providers use it.
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
@marinofaggiana Please check |
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]> # Conflicts: # iOSClient/Networking/NCNetworking.swift
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]> # Conflicts: # iOSClient/Login/NCLogin.swift # iOSClient/Supporting Files/en.lproj/Localizable.strings
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
} | ||
} | ||
} | ||
} | ||
} | ||
|
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.
Can you explain ?
…-v2-enable Signed-off-by: Milen Pivchev <[email protected]> # Conflicts: # Brand/NCBrand.swift # Nextcloud.xcodeproj/project.pbxproj # iOSClient/AppDelegate.swift
Signed-off-by: Milen Pivchev <[email protected]>
Signed-off-by: Milen Pivchev <[email protected]>
This enables Login v2 and adds support for TLS client certificates.
@marinofaggiana We can remove all v1 code with removal of oldest supported NC version