question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cyclic dependencies when using AuthorizationServer(Client, app)

See original GitHub issue

At least in my case, when creating an AuthorizationServer, it requires the Client model. This has the requirement that the models be imported. However, since the models themselves also import __init__.py through from .. import db, login_manager, it creates a cyclic include.

Due to this constraint, the next best option is to use flask-oauthlib library. It might make sense to address this issue, either in the documentation or in the code architecturally.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

6reactions
lepturecommented, Apr 21, 2018
0reactions
lepturecommented, Feb 10, 2018

Actually authlib playground has a better folder structure, you can learn something from it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

oauth2 - Circular dependency in microservices architecture for ...
(D) The authorization server authenticates the client and validates the authorization grant, and if valid, issues an access token.
Read more >
The vicious cycle of circular dependencies in microservices
Ideally, a microservices application shouldn't contain circular dependencies. This means that one service should not call another one directly.
Read more >
Spring Security circular bean dependency - Stack Overflow
I'm currently working on a Vaadin spring application. According to the app specifications, authentication/authorization of the ...
Read more >
Circular Dependencies in Spring - Baeldung
A quick writeup on dealing with circular dependencies in Spring: how they occur and several ways to work around them.
Read more >
NG0200: Circular dependency in DI detected while ... - Angular
Use the call stack to determine where the cyclical dependency exists. You will be able to see if any child dependencies rely on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found