diff --git a/Auth0/_ObjectiveAuthenticationAPI.swift b/Auth0/_ObjectiveAuthenticationAPI.swift index eef97569..50499f02 100644 --- a/Auth0/_ObjectiveAuthenticationAPI.swift +++ b/Auth0/_ObjectiveAuthenticationAPI.swift @@ -48,6 +48,14 @@ public class _ObjectiveAuthenticationAPI: NSObject { .start(handleResult(callback: callback)) } + @objc(loginWithUsernameOrEmail:password:realm:audience:scope:parameters:callback:) + // swiftlint:disable:next function_parameter_count + public func login(withUsernameOrEmail username: String, password: String, realm: String, audience: String, scope: String, parameters: [String: Any]?, callback: @escaping (NSError?, Credentials?) -> Void) { + self.authentication + .login(usernameOrEmail: username, password: password, realm: realm, audience: audience, scope: scope, parameters: parameters ?? [:]) + .start(handleResult(callback: callback)) + } + @objc(createUserWithEmail:username:password:connection:userMetadata:callback:) // swiftlint:disable:next function_parameter_count public func createUser(withEmail email: String, username: String?, password: String, connection: String, userMetadata: [String: Any]?, callback: @escaping (NSError?, [String: Any]?) -> Void) { @@ -70,6 +78,20 @@ public class _ObjectiveAuthenticationAPI: NSObject { } } +#if canImport(UIKit) + @objc(resumeAuthWithURL:options:) + public static func resume(_ url: URL, options: [A0URLOptionsKey: Any]) -> Bool { + return resumeAuth(url, options: options) + } +#endif + + @objc(renewWithRefreshToken:scope:callback:) + public func renew(WithRefreshToken refreshToken: String, scope: String, callback: @escaping (NSError?, Credentials?) -> Void) { + self.authentication + .renew(withRefreshToken: refreshToken, scope: scope) + .start(handleResult(callback: callback)) + } + @objc(resetPasswordWithEmail:connection:callback:) public func resetPassword(withEmail email: String, connection: String, callback: @escaping (NSError?) -> Void) { self.authentication