Skip to content

Commit

Permalink
bug fix: make login flow public
Browse files Browse the repository at this point in the history
  • Loading branch information
underthestars-zhy committed May 2, 2023
1 parent 2585709 commit 72adce3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/MobbinAPI/User/Login.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ extension MobbinAPI {
return try JSONDecoder().decode(Bool.self, from: data)
}

func sendEmail() async throws {
public func sendEmail() async throws {
guard try await !shoudUsePassword() else { throw MobbinError.emailProblem }

guard let URL = URL(string: "https://ujasntkfphywizsdaapi.supabase.co/auth/v1/otp") else { throw HTTPError.wrongUrlFormat }
Expand Down Expand Up @@ -90,7 +90,7 @@ extension MobbinAPI {
}
}

func verify(code: String) async throws -> Bool {
public func verify(code: String) async throws -> Bool {
guard let URL = URL(string: "https://ujasntkfphywizsdaapi.supabase.co/auth/v1/verify") else { throw HTTPError.wrongUrlFormat }
var request = URLRequest(url: URL)
request.httpMethod = "POST"
Expand Down

0 comments on commit 72adce3

Please sign in to comment.