mirror of
				https://github.com/elyby/accounts-frontend.git
				synced 2025-05-31 14:11:58 +05:30 
			
		
		
		
	Доработано поведение для идентификации статичного редиректа
This commit is contained in:
		| @@ -192,7 +192,9 @@ export function oAuthComplete(params = {}) { | |||||||
|             } |             } | ||||||
|         }) |         }) | ||||||
|         .then((resp) => { |         .then((resp) => { | ||||||
|             if (resp.redirectUri === 'static_page' || resp.redirectUri === 'static_page_with_code') { |             if (resp.redirectUri.startsWith('static_page')) { | ||||||
|  |                 resp.code = resp.redirectUri.match(/code=(.+)&/)[1]; | ||||||
|  |                 resp.redirectUri = resp.redirectUri.match(/^(.+)\?/)[1]; | ||||||
|                 resp.displayCode = resp.redirectUri === 'static_page_with_code'; |                 resp.displayCode = resp.redirectUri === 'static_page_with_code'; | ||||||
|                 dispatch(setOAuthCode({ |                 dispatch(setOAuthCode({ | ||||||
|                     success: resp.success, |                     success: resp.success, | ||||||
|   | |||||||
| @@ -33,14 +33,10 @@ export default class CompleteState extends AbstractState { | |||||||
|                     data.accept = this.isPermissionsAccepted; |                     data.accept = this.isPermissionsAccepted; | ||||||
|                 } |                 } | ||||||
|                 context.run('oAuthComplete', data).then((resp) => { |                 context.run('oAuthComplete', data).then((resp) => { | ||||||
|                     switch (resp.redirectUri) { |                     if (resp.redirectUri.startsWith('static_page')) { | ||||||
|                         case 'static_page': |                         context.setState(new FinishState()); | ||||||
|                         case 'static_page_with_code': |                     } else { | ||||||
|                             context.setState(new FinishState()); |                         location.href = resp.redirectUri; | ||||||
|                             break; |  | ||||||
|                         default: |  | ||||||
|                             location.href = resp.redirectUri; |  | ||||||
|                             break; |  | ||||||
|                     } |                     } | ||||||
|                 }, (resp) => { |                 }, (resp) => { | ||||||
|                     // TODO |                     // TODO | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user