From 05cd559e34579a304b9498212aa155f128d47576 Mon Sep 17 00:00:00 2001 From: arzumify Date: Sun, 20 Oct 2024 16:41:46 +0100 Subject: [PATCH] Updated libraries, fixed login --- go.mod | 2 +- go.sum | 2 ++ resources/wasm/oauth/main.go | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3b1b296..978d5f5 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.23.1 require ( git.ailur.dev/ailur/fg-library/v2 v2.0.1 - git.ailur.dev/ailur/fg-nucleus-library v1.0.0 + git.ailur.dev/ailur/fg-nucleus-library v1.0.2 github.com/golang-jwt/jwt/v5 v5.2.1 github.com/google/uuid v1.6.0 ) diff --git a/go.sum b/go.sum index 3bc76a9..5ee4fdf 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,8 @@ git.ailur.dev/ailur/fg-library/v2 v2.0.1 h1:ltPYXf/Om0hnMD8gr1K5bkYrfHqKPSbb0hxa git.ailur.dev/ailur/fg-library/v2 v2.0.1/go.mod h1:1jYbWhabGcIwp7CkhHqvRwC8eP+nHv5BrXPe9NX2HE8= git.ailur.dev/ailur/fg-nucleus-library v1.0.0 h1:TT1V4cfka+uUpvV1zU7bc4KXFkgnsI/sIvaZDDxXk+k= git.ailur.dev/ailur/fg-nucleus-library v1.0.0/go.mod h1:m4gNSEypfgrUV8bXaR8NLB8zchUM59y0ellV1wp/C+I= +git.ailur.dev/ailur/fg-nucleus-library v1.0.2 h1:EWfeab+wJKaxx/Qg5TKpvZHicA0V/NilUv2g6W97rtg= +git.ailur.dev/ailur/fg-nucleus-library v1.0.2/go.mod h1:T2mdUiXlZqb917CkNB2vwujkD/QhJDpCHLRvKuskBpY= github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw= github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= diff --git a/resources/wasm/oauth/main.go b/resources/wasm/oauth/main.go index f9d491d..47b99e1 100644 --- a/resources/wasm/oauth/main.go +++ b/resources/wasm/oauth/main.go @@ -41,9 +41,7 @@ func randomChars(length int) (string, error) { } func main() { - // Clear local storage localStorage := js.Global().Get("localStorage") - localStorage.Call("clear") statusBox := js.Global().Get("document").Call("getElementById", "statusBox") tryAgain := js.Global().Get("document").Call("getElementById", "tryAgain") @@ -175,6 +173,9 @@ func main() { tryAgain.Set("style", "") } } else { + // Clear local storage + localStorage.Call("clear") + // Start the authorization process verifier, err := randomChars(128) if err != nil {