mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-27 15:30:37 +05:30
Ресет стейта авторизации в том случае, если юзер захотел перейти на /
This commit is contained in:
parent
bd9635fc12
commit
d19735b7e1
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user