Create sign-in and sign-out workflow in SPA

This commit is contained in:
Eli Ribble 2026-04-16 17:14:57 +00:00
parent 08a1b5b81d
commit b6d1bd9ee2
No known key found for this signature in database
15 changed files with 761 additions and 460 deletions

View file

@ -7,6 +7,7 @@ import (
"github.com/Gleipnir-Technology/nidus-sync/auth"
nhttp "github.com/Gleipnir-Technology/nidus-sync/http"
"github.com/Gleipnir-Technology/nidus-sync/platform"
"github.com/rs/zerolog/log"
)
@ -36,3 +37,7 @@ func postSignin(ctx context.Context, r *http.Request, req reqSignin) (string, *n
}
return "/", nil
}
func postSignout(ctx context.Context, w http.ResponseWriter, r *http.Request, u platform.User) *nhttp.ErrorWithStatus {
auth.SignoutUser(r, u)
return nil
}