|  | @@ -26,6 +26,11 @@ func SignIn(ctx *middleware.Context) {
 | 
	
		
			
				|  |  |  		return
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +	if setting.OauthService != nil {
 | 
	
		
			
				|  |  | +		ctx.Data["OauthEnabled"] = true
 | 
	
		
			
				|  |  | +		ctx.Data["OauthService"] = setting.OauthService
 | 
	
		
			
				|  |  | +	}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  	// Check auto-login.
 | 
	
		
			
				|  |  |  	userName := ctx.GetCookie(setting.CookieUserName)
 | 
	
		
			
				|  |  |  	if len(userName) == 0 {
 | 
	
	
		
			
				|  | @@ -33,11 +38,6 @@ func SignIn(ctx *middleware.Context) {
 | 
	
		
			
				|  |  |  		return
 | 
	
		
			
				|  |  |  	}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -	if setting.OauthService != nil {
 | 
	
		
			
				|  |  | -		ctx.Data["OauthEnabled"] = true
 | 
	
		
			
				|  |  | -		ctx.Data["OauthService"] = setting.OauthService
 | 
	
		
			
				|  |  | -	}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  	isSucceed := false
 | 
	
		
			
				|  |  |  	defer func() {
 | 
	
		
			
				|  |  |  		if !isSucceed {
 |