Merge branch 'no-timeout' of OAuth3/oauth3.js into v1.2
This commit is contained in:
		
						commit
						c59e23d114
					
				| @ -1030,11 +1030,10 @@ | |||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         var timeout = opts.timeout; |         var timeout = opts.timeout; | ||||||
|         if (opts.debug) { |         if ('background' === windowType) { | ||||||
|           timeout = timeout || 3 * 60 * 1000; |           if (!timeout) { | ||||||
|  |             timeout = 7 * 1000; | ||||||
|           } |           } | ||||||
|         else { |  | ||||||
|           timeout = timeout || ('background' === windowType ? 15 * 1000 : 3 * 60 * 1000); |  | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         return new OAUTH3.PromiseA(function (resolve, reject) { |         return new OAUTH3.PromiseA(function (resolve, reject) { | ||||||
| @ -1056,6 +1055,7 @@ | |||||||
|             cleanup(); |             cleanup(); | ||||||
|           }; |           }; | ||||||
| 
 | 
 | ||||||
|  |           if (timeout) { | ||||||
|             tok = setTimeout(function () { |             tok = setTimeout(function () { | ||||||
|               var err = new Error( |               var err = new Error( | ||||||
|                 "the '" + windowType + "' request did not complete within " + Math.round(timeout / 1000) + "s" |                 "the '" + windowType + "' request did not complete within " + Math.round(timeout / 1000) + "s" | ||||||
| @ -1064,6 +1064,7 @@ | |||||||
|               reject(err); |               reject(err); | ||||||
|               cleanup(); |               cleanup(); | ||||||
|             }, timeout); |             }, timeout); | ||||||
|  |           } | ||||||
| 
 | 
 | ||||||
|           setTimeout(function () { |           setTimeout(function () { | ||||||
|             if (!OAUTH3._browser._frames[state]) { |             if (!OAUTH3._browser._frames[state]) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user