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) => { | ||||
|             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'; | ||||
|                 dispatch(setOAuthCode({ | ||||
|                     success: resp.success, | ||||
|   | ||||
| @@ -33,14 +33,10 @@ export default class CompleteState extends AbstractState { | ||||
|                     data.accept = this.isPermissionsAccepted; | ||||
|                 } | ||||
|                 context.run('oAuthComplete', data).then((resp) => { | ||||
|                     switch (resp.redirectUri) { | ||||
|                         case 'static_page': | ||||
|                         case 'static_page_with_code': | ||||
|                             context.setState(new FinishState()); | ||||
|                             break; | ||||
|                         default: | ||||
|                             location.href = resp.redirectUri; | ||||
|                             break; | ||||
|                     if (resp.redirectUri.startsWith('static_page')) { | ||||
|                         context.setState(new FinishState()); | ||||
|                     } else { | ||||
|                         location.href = resp.redirectUri; | ||||
|                     } | ||||
|                 }, (resp) => { | ||||
|                     // TODO | ||||
|   | ||||
		Reference in New Issue
	
	Block a user