fix: logout should set address to / and open /
This commit is contained in:
parent
a367ed9a34
commit
ec47c9d610
|
@ -242,7 +242,11 @@ https://stackoverflow.com/questions/62307431/firefox-sends-secure-cookies-to-loc
|
||||||
see: except on localhost : https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
|
see: except on localhost : https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie
|
||||||
|
|
||||||
|
|
||||||
** TODO maybe add middleware so that 401 would be a page, and not json
|
** TODO prettying up server responses for "we show html" land
|
||||||
|
let's do this also, yes
|
||||||
|
*** DONE logout should push root url in htmx
|
||||||
|
*** TODO lets make 404 page and return it
|
||||||
|
*** TODO lets make 401 page and return it
|
||||||
** TODO get icons for the auth providers. surely they are accessible from the pocketbase itself?
|
** TODO get icons for the auth providers. surely they are accessible from the pocketbase itself?
|
||||||
http://localhost:8090/_/images/oauth2/apple.svg
|
http://localhost:8090/_/images/oauth2/apple.svg
|
||||||
yes.
|
yes.
|
||||||
|
@ -253,3 +257,6 @@ https://pocketbase.io/docs/go-migrations/#enable-go-migrations
|
||||||
if i understood correctly, when i enable migration generation
|
if i understood correctly, when i enable migration generation
|
||||||
i would be able to modify locally run instance via admin interface,
|
i would be able to modify locally run instance via admin interface,
|
||||||
go files with migration would be generated, i'll have to import them somewhere in my main module, and then after building/packaging when i run `serve` on production the migrations would run on the production data
|
go files with migration would be generated, i'll have to import them somewhere in my main module, and then after building/packaging when i run `serve` on production the migrations would run on the production data
|
||||||
|
** adding google oauth
|
||||||
|
support article : https://developers.google.com/identity/sign-in/web/sign-in
|
||||||
|
settings are in : https://console.cloud.google.com/apis/credentials
|
||||||
|
|
|
@ -101,7 +101,7 @@ func getLogoutRoute(app *pocketbase.PocketBase) func(*core.ServeEvent) error {
|
||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
})
|
})
|
||||||
c.Response().Header().Add("HX-Trigger", "auth-change-event")
|
c.Response().Header().Add("HX-Trigger", "auth-change-event")
|
||||||
return c.JSON(http.StatusOK, map[string]string{"message": "session cookie removed"})
|
return c.NoContent(http.StatusOK)
|
||||||
})
|
})
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
></script>
|
></script>
|
||||||
<script defer src="/static/static/public/htmx.min.js"></script>
|
<script defer src="/static/static/public/htmx.min.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body hx-get="/" hx-trigger="auth-change-event">
|
<body hx-get="/" hx-trigger="auth-change-event" hx-push-url="true">
|
||||||
<!--[if lt IE 8]>
|
<!--[if lt IE 8]>
|
||||||
<p class="browserupgrade">
|
<p class="browserupgrade">
|
||||||
You are using an <strong>outdated</strong> browser. Please
|
You are using an <strong>outdated</strong> browser. Please
|
||||||
|
|
Loading…
Reference in New Issue