full handle login
This commit is contained in:
parent
fca89a52d5
commit
3d392fd99e
@ -209,9 +209,14 @@ struct AddInstanceView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private func signIn() async {
|
private func signIn() async {
|
||||||
let cleanInstance = instanceUrl
|
var cleanInstance = self.instanceUrl
|
||||||
|
if instanceUrl.contains("@") {
|
||||||
|
cleanInstance = String(instanceUrl.split(separator: "@")[1]) // instance
|
||||||
|
} else {
|
||||||
|
cleanInstance = instanceUrl
|
||||||
.replacingOccurrences(of: "http://", with: "")
|
.replacingOccurrences(of: "http://", with: "")
|
||||||
.replacingOccurrences(of: "https://", with: "")
|
.replacingOccurrences(of: "https://", with: "")
|
||||||
|
}
|
||||||
|
|
||||||
signInClient = .init(server: cleanInstance)
|
signInClient = .init(server: cleanInstance)
|
||||||
if let oauthURL = try? await signInClient?.oauthURL(),
|
if let oauthURL = try? await signInClient?.oauthURL(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user