Implement Google OAuth2

This commit is contained in:
2024-04-30 15:16:33 +07:00
parent 0b8d4af794
commit da31733dcc
7 changed files with 274 additions and 6 deletions

View File

@ -67,7 +67,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
}
userAgent := r.Header.Get("User-Agent")
browserInfo, osInfo := parseUserAgent(userAgent)
browserInfo, osInfo := ParseUserAgent(userAgent)
sessionInfo := session.SessionInfo{
SessionID: storeSession.ID,
@ -106,7 +106,7 @@ func POST(w http.ResponseWriter, r *http.Request) {
}
}
func parseUserAgent(userAgent string) (map[string]string, map[string]string) {
func ParseUserAgent(userAgent string) (map[string]string, map[string]string) {
browserInfo := make(map[string]string)
osInfo := make(map[string]string)
if strings.Contains(userAgent, "Firefox") {