Add gothic example code to internal/auth
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"gothtest/internal/auth"
|
||||
"encoding/json"
|
||||
"log"
|
||||
"fmt"
|
||||
@@ -54,7 +55,7 @@ func (s *Server) getAuthCallbackFunc(w http.ResponseWriter, r *http.Request) {
|
||||
provider := chi.URLParam(r, "provider")
|
||||
r = r.WithContext(context.WithValue(context.Background(), "provider", provider))
|
||||
|
||||
user, err := gothic.CompleteUserAuth(w, r)
|
||||
user, err := auth.CompleteAuthFlow(w, r)
|
||||
if err != nil {
|
||||
fmt.Fprintln(w, err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user