Skip to content

Commit

Permalink
Fix login() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Got17 committed Oct 18, 2024
1 parent bca0b42 commit c1ab238
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions FingerAuth/Client.fs
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ module Logic =
let! savedUsername = Capacitor.Preferences.Get(Preferences.GetOptions(key = USERNAME_KEY))
let! savedPassword = Capacitor.Preferences.Get(Preferences.GetOptions(key = PASSWORD_KEY))

if not (String.IsNullOrEmpty(username.Value)) && not (String.IsNullOrEmpty(password.Value)) then
username := savedUsername.Value.Value1
password := savedPassword.Value.Value1
showToast("Credentials loaded") |> ignore
//if not (String.IsNullOrEmpty(username.Value)) && not (String.IsNullOrEmpty(password.Value)) then
username := savedUsername.Value.Value1
password := savedPassword.Value.Value1
showToast("Credentials loaded") |> ignore
}

let login() = promise {
Expand All @@ -174,7 +174,8 @@ module Logic =
else
showAlert("Alert", "Username and Password can not be left empty.") |> ignore


toPicDrawPage := "/#/picdraw"
JS.Window.Location.Replace(toPicDrawPage.Value) |> ignore
printfn("User logged in successfully!")
}

Expand All @@ -192,10 +193,9 @@ module Logic =
AllowDeviceCredential = true
)) |> ignore

loadCredentials()|>ignore

toPicDrawPage := "/#/picdraw"
JS.Window.Location.Replace(toPicDrawPage.Value) |> ignore
loadCredentials()|>ignore




with ex ->
Expand Down

0 comments on commit c1ab238

Please sign in to comment.