mirror of
				https://github.com/elyby/accounts-frontend.git
				synced 2025-05-31 14:11:58 +05:30 
			
		
		
		
	oauth init by guest hotfix
This commit is contained in:
		| @@ -166,6 +166,13 @@ export function oAuthComplete(params = {}) { | ||||
|             typeof params.accept === 'undefined' ? {} : {accept: params.accept} | ||||
|         ) | ||||
|         .then((resp) => { | ||||
|             if (resp.status === 401 && resp.name === 'Unauthorized') { | ||||
|                 // TODO: temporary solution for oauth init by guest | ||||
|                 // TODO: request serivce should handle http status codes | ||||
|                 dispatch(routeActions.push('/oauth/permissions')); | ||||
|                 return; | ||||
|             } | ||||
|  | ||||
|             if (resp.redirectUri) { | ||||
|                 location.href = resp.redirectUri; | ||||
|             } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user