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