Support for the GET /oauth/authorize is broken - returns 500
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- authentication, backend
Research direction
Start with website/routes.py, especially the authorize route at line 101, and reproduce the failure by running the example with flask run before requesting GET /oauth/authorize. Trace the AuthorizationServer API used there and compare it with the example's installed Authlib version. Done means the authorization endpoint no longer raises AttributeError and the documented OAuth flow can be exercised successfully.
Written by the indexing model from the issue text.
Description
Just using this example to explore the library, and hard to tell how things are supposed to fit together without docs or a (working) sample.
To reproduce the problem, just setup and run (flask run)
Verify
curl -u ${client_id}:${client_secret} -XPOST http://127.0.0.1:5000/oauth/token -F grant_type=password -F username=${username} -F password=${password} -F scope=profile
works fine/as expected.
Then try (from a web browser probably but thats what I was trying to figure out)
GET http://127.0.0.1:5000/oauth/authorize
Crashes cuz
,,,
File "/home/lewis/.local/lib/python3.10/site-packages/flask/app.py", line 1796, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/mnt/c/Sandbox/SimoneOAuth2/example-oauth2-server/website/routes.py", line 101, in authorize
grant = authorization.get_consent_grant(end_user=user)
AttributeError: 'AuthorizationServer' object has no attribute 'get_consent_grant'
- Dominant language
- Python
- Stars
- 705
- Forks
- 279
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from authlib/example-oauth2-server
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
authlib/example-oauth2-server#95 · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
authlib/example-oauth2-server#92 · 4 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 42/100
authlib/example-oauth2-server#86 · 2 comments ·
All issues in authlib/example-oauth2-server
Similar issues
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
simonw/sqlite-utils#872 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100