mirror of
				https://github.com/elyby/accounts-frontend.git
				synced 2025-05-31 14:11:58 +05:30 
			
		
		
		
	Ресет стейта авторизации в том случае, если юзер захотел перейти на /
This commit is contained in:
		| @@ -74,6 +74,11 @@ export default class AuthFlow { | ||||
|     handleRequest(path, replace) { | ||||
|         this.replace = replace; | ||||
|  | ||||
|         if (path === '/') { | ||||
|             // reset oauth data if user tried to navigate to index route | ||||
|             this.run('setOAuthRequest', {}); | ||||
|         } | ||||
|  | ||||
|         switch (path) { | ||||
|             case '/oauth': | ||||
|                 this.setState(new OAuthState()); | ||||
|   | ||||
| @@ -24,7 +24,7 @@ export default class CompleteState extends AbstractState { | ||||
|             context.setState(new ActivationState()); | ||||
|         } else if (user.shouldChangePassword) { | ||||
|             context.setState(new ChangePasswordState()); | ||||
|         } else if (auth.oauth) { | ||||
|         } else if (auth.oauth && auth.oauth.clientId) { | ||||
|             if (auth.oauth.code) { | ||||
|                 context.setState(new FinishState()); | ||||
|             } else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user