Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

Commit

Permalink
Removes loginWithMagicLink
Browse files Browse the repository at this point in the history
  • Loading branch information
Ariflo committed May 17, 2023
1 parent c303c7a commit f2bf9ae
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 37 deletions.
12 changes: 0 additions & 12 deletions Sources/MagicSDK/Modules/Auth/AuthConfiguration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@

import Foundation

/// LoginWithMagicLink configuration
public struct LoginWithMagicLinkConfiguration: BaseConfiguration {

/// Shows UI if sets to true
public var showUI: Bool
public var email: String

public init(showUI: Bool = true, email: String) {
self.showUI = showUI
self.email = email
}
}

public struct LoginWithSmsConfiguration: BaseConfiguration {

Expand Down
1 change: 0 additions & 1 deletion Sources/MagicSDK/Modules/Auth/AuthMethod.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import Foundation
internal enum AuthMethod: String, CaseIterable {

// Auth
case magic_auth_login_with_magic_link
case magic_auth_login_with_sms
case magic_auth_login_with_email_otp
}
24 changes: 0 additions & 24 deletions Sources/MagicSDK/Modules/Auth/AuthModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,6 @@ public class AuthModule: BaseModule {
category: String(describing: AuthModule.self)
)

// MARK: - Login with magic link
public func loginWithMagicLink (_ configuration: LoginWithMagicLinkConfiguration, response: @escaping Web3ResponseCompletion<String> ) {
let request = RPCRequest<[LoginWithMagicLinkConfiguration]>(method: AuthMethod.magic_auth_login_with_magic_link.rawValue, params: [configuration])
self.provider.send(request: request, response: response)
}

public func loginWithMagicLink (_ configuration: LoginWithMagicLinkConfiguration) -> Promise<String> {
return Promise { resolver in
loginWithMagicLink(configuration, response: promiseResolver(resolver))
}
}

public func loginWithMagicLink (_ configuration: LoginWithMagicLinkConfiguration, eventLog: Bool) -> MagicEventPromise<String> {
return MagicEventPromise (eventCenter: self.magicEventCenter, eventLog: eventLog) { resolver in
self.loginWithMagicLink(configuration, response: promiseResolver(resolver))
}
}

// MARK: - Login with SMS
public func loginWithSMS (_ configuration: LoginWithSmsConfiguration, response: @escaping Web3ResponseCompletion<String> ) {
if #available(iOS 14.0, *) {
Expand Down Expand Up @@ -70,10 +52,4 @@ public class AuthModule: BaseModule {
loginWithEmailOTP(configuration, response: promiseResolver(resolver))
}
}

public enum LoginWithMagicLinkEvent: String {
case emailNotDeliverable = "email-not-deliverable"
case emailSent = "email-sent"
case retry = "retry"
}
}

0 comments on commit f2bf9ae

Please sign in to comment.