commit d1402e420194e3f2c5757d8c83c388f9bb4630d3
parent 102c9bb702518c93dbe2da0e1f7a0e8dcdad6645
Author: MTRNord <mtrnord1@gmail.com>
Date: Sat, 31 Mar 2018 14:08:50 +0200
Debug domain
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/api/login/twitter.go b/api/login/twitter.go
@@ -7,6 +7,7 @@ import (
"github.com/dghubble/gologin/twitter"
"github.com/dghubble/oauth1"
"github.com/dghubble/sessions"
+ "log"
"net/http"
)
@@ -64,7 +65,8 @@ func AuthRedirectHandler(config *oauth1.Config, failure http.Handler) http.Handl
}
fn := func(w http.ResponseWriter, req *http.Request) {
domain := req.Header.Get("Host")
- config.CallbackURL = "https://" + domain + "/login/twitter/callback"
+ log.Println(domain)
+ config.CallbackURL = "https://" + domain + "/api/login/twitter/callback"
TConfig = config
ctx := req.Context()
requestToken, _, err := libLogin.RequestTokenFromContext(ctx)