mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Update refresh endpoint to support override cookie token
This commit is contained in:
		
							parent
							
								
									8b995a179d
								
							
						
					
					
						commit
						44ff90a6f2
					
				| @ -484,8 +484,9 @@ class Auth { | ||||
|       let refreshToken = req.cookies.refresh_token | ||||
| 
 | ||||
|       // For mobile clients, the refresh token is sent in the authorization header
 | ||||
|       // Force return refresh token if x-return-tokens header is true
 | ||||
|       let shouldReturnRefreshToken = false | ||||
|       if (!refreshToken && req.headers.authorization?.startsWith('Bearer ')) { | ||||
|       if (req.headers.authorization?.startsWith('Bearer ') && (!refreshToken || req.headers['x-return-tokens'] === 'true')) { | ||||
|         refreshToken = req.headers.authorization.split(' ')[1] | ||||
|         shouldReturnRefreshToken = true | ||||
|       } | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user