Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync / Login loop #70

Closed
fschoell opened this issue Jul 6, 2017 · 6 comments
Closed

Sync / Login loop #70

fschoell opened this issue Jul 6, 2017 · 6 comments
Assignees

Comments

@fschoell
Copy link
Contributor

fschoell commented Jul 6, 2017

The problem is when the user can be authenticated on the remote database but somehow not locally.

I had this problem currently on the entity_mapper branch. The local login fails (username / password not correct because of the prefix change). However, due to the failed local login the LoginComponent get's stuck in a loop. First onLoginFailure() is called, which then calls retryLoginAfterSync(), which subscribes to the database sync status and then (because the sync actually works) will be notified about the completed sync, which then leads to another call to login(), which triggers another remote authentication and because this works (and the local authentication not), this triggers a new sync and the whole procedure from onLoginFailure()starts again.

@sleidig sleidig added this to the TypeScript/Angular2/Architecture Rewrite milestone Jul 7, 2017
@sleidig
Copy link
Member

sleidig commented Jul 7, 2017

Is this the same issue as #31 ? Probably it's at least somehow related.

If there is a radically better/simpler solution for this mixing of sync and login I would be more than happy.

@fschoell
Copy link
Contributor Author

Ok, found the bug. This line is actually the problem. It resets isRetriedLogin when onLoginFailure() is called. This is a problem, because this way this statement will always return true, no matter how many retries we actually had.

@fschoell fschoell modified the milestones: TypeScript/Angular2/Architecture Rewrite, Next Features Jul 11, 2017
@Lorsbyjm
Copy link
Contributor

Lorsbyjm commented Jul 5, 2018

@liwde is this still possible?

@sleidig sleidig modified the milestones: Features&Improvements, Additional Features [v2.3] Jul 13, 2018
@liwde
Copy link
Contributor

liwde commented Jul 19, 2018

Recent changes (#130) reintroduced this bug in the master.

fb7123d does work (all logging through AlertService)
d28c720 doesn't work (Merge PR130)

I'm investigating, but currently I don't see where the issue is coming from.

I tried to implement @fschoell's solution, but then the login didn't work at all.
I also tried to always self.retryLoginSubscription.unsubscribe(); regardless of sync state (sync works fine, as described above), but then Login doesn't work at all.

I will continue investigating next week.

@sleidig
Copy link
Member

sleidig commented Jul 23, 2018

So this is only occurring when the remote login succeeds and the local login fails? That would be a fringe case that only occurs on an inconsistent database, isn't it?
I'd suggest to first finish the redesign of the whole Session/Login system (#78) and only then look back at this to see whether it still occurs.

@sleidig sleidig modified the milestones: [v2.4], [v2.5] Aug 31, 2018
@sleidig sleidig modified the milestones: [v2.5], [v2.6] Dec 14, 2018
@sleidig sleidig modified the milestones: [v2.6], [v2.7] Jun 17, 2019
@sleidig sleidig removed this from the [v2.8] milestone Nov 11, 2019
@sleidig
Copy link
Member

sleidig commented Nov 30, 2019

closing this as the whole session/login architecture has changed with PR #246 (issue #78). If similar problems come up again we can open a new issue.

@sleidig sleidig closed this as completed Nov 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants