diff options
Diffstat (limited to 'modules/auth/auth.go')
-rw-r--r-- | modules/auth/auth.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/auth/auth.go b/modules/auth/auth.go index ed94d0a698..811f890746 100644 --- a/modules/auth/auth.go +++ b/modules/auth/auth.go @@ -35,6 +35,9 @@ func SignedInID(ctx *macaron.Context, sess session.Store) int64 { // Check access token. if IsAPIPath(ctx.Req.URL.Path) { tokenSHA := ctx.Query("token") + if len(tokenSHA) <= 0 { + tokenSHA = ctx.Query("access_token") + } if len(tokenSHA) == 0 { // Well, check with header again. auHead := ctx.Req.Header.Get("Authorization") |