-
Notifications
You must be signed in to change notification settings - Fork 388
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
Added an adapter for FastAPI #216
Conversation
Thanks, this is great! Could you provide an example usage with test? like here: https://github.com/authomatic/authomatic/tree/master/examples |
Thank you. I'll soon enough |
@jensens I think I'm having some problems running the tests, after I installed the deps, I run
I'm running Python 3.8 |
@jensens I understand the error, but I've assumed that this error happened only to me because if authomatic is on GitHub with TravisCI then the tests should be passing right? |
I haven't had a deep dig, but it looks like the authomatic code calls |
OK so it looks like this is still the 'right thing to do' according to the Flask docs: https://flask.palletsprojects.com/en/2.0.x/api/#sessions It looks like this is probably a bug in @LeOndaz if you want to work round this for now, just chang the last line in
(but don't commit this in any PRs you make, and we'll hopefully resolve it separately). |
( @jensens Raised with Flask in pallets/flask#4219 - will see what they say) |
@mrichar1 Thank you for your efforts, not gonna lie, I removed flask support when I got the error 😂 |
That's it for today. Sorry for missing the formatting thing, I didn't notice that there's an unformatted file. |
Flask have confirmed the pylint issue is an upstream pylint false-positive, so have pushed the @LeOndaz It looks liek this has raised a conflict, so you'll need to fix/rebase your PR against |
@mrichar1 I've fixed the conflict, you've added the comment and I've disabled pylint for the line |
@mrichar1 Hello, can you review and merge if it's okay with you? |
We've just been making changes to re-enable automatic testing on PRs and commits - I've just merged these chanegs in master onto this PR to get these tests running. Will then start a code review when they complete. |
@mrichar1 Perfect, Thanks for your efforts. we've now 4 checks that passed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
I had missed that while fastAPI was added to the test stack, it wasn't actually being selected in the test config. I've updated this setting in your branch, which should cause it to run - though the tests that require auth secrets will be skipped. I'll run these offline and feed back if there are any issues. |
So the test with secrets failed as
Can you look at getting the test suite updated in |
@mrichar1 |
@mrichar1 |
@mrichar1 Kindly review the other repo PRs to solve and merge this one |
@mrichar1 I'll appreciate if you reply |
@mrichar1 hopefully you're still alive 😅 |
@LeOndaz I tried your branch as we need FastAPI support in our project. The example does not work here. I made my own enhanced example for the project here https://github.com/ECC-Pilot/example-fastapi-github-oauth2 I'll prepare a review with fixes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
findings
Feel free to commit in this PR and merge after you are done, I'm no longer interested in authomatic as it's unmaintained so I won't be exerting effort for it |
@mrichar1 this is green now. So, nothing stops us from merging, right? |
Yes - I finally managed to get tests and releases working again (!), so if it's passing then it should be fine to merge. To make a new release, update the version in (A push to |
The new release process has a glitch, see #225 |
It looks like the 'full' run of this the test suite for this PR is failing, with none of the FastAPI tests passing. The issue seems to resolve around
I can't remember what state If we think that this code is valid, but the test is failing due to a lack of support in |
I never dig into |
This PR introduces an adapter for FastAPI. I'll create an example and PR it later.