Technology moves fast! ⚡ Don't get left behind.🚶 Subscribe to our mailing list to keep up with latest and greatest in open source projects! 🏆


Subscribe to our mailing list

example-oauth2-server

**DEPRECATED** Example for OAuth 2 Server. See https://docs.authlib.org/en/latest/flask/oauth2.html instead.

Subscribe to updates I use example-oauth2-server


Statistics on example-oauth2-server

Number of watchers on Github 201
Number of open issues 7
Average time to close an issue 6 months
Main language Python
Average time to merge a PR about 1 month
Open pull requests 6+
Closed pull requests 2+
Last commit over 1 year ago
Repo Created over 5 years ago
Repo Last Updated over 1 year ago
Size 120 KB
Organization / Authorlepture
Contributors7
Page Updated
Do you use example-oauth2-server? Leave a review!
View open issues (7)
View example-oauth2-server activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating example-oauth2-server for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

Example for OAuth 2 Server

This is an example of OAuth 2 Server.

Find more details on http://lepture.com/en/2013/create-oauth-server

Installation

$ pip install -r requirements.txt

Usage

  1. Start your provider server with:

    $ python app.py
    
  2. Visit http://127.0.0.1:5000/ and fill a username.

    00_oauth_server_form.png

  3. And then visit http://127.0.0.1:5000/client

    01_oauth_server.png

  4. Take the client key and client secret, and modify our client.py script with the key and secret. Specifically update CLIENT_ID and CLIENT_SECRET variables on lines 5-6.

  5. Start the client server with:

    $ python client.py
    
  6. Visit http://localhost:8000, everything should work correctly. We will be redirected to a confirm page, if we choose yes, client will obtain a pair of access token and secret.

    02_oauth_client.png 03_oauth_client_authorized.png

  7. Finally, if you visit http://localhost:8000 you can access the authorized data:

    04_oauth_client_retrieves_data.png

example-oauth2-server open issues Ask a question     (View All Issues)
  • over 2 years /oauth/authorize redirects to /oauth/errors (argument of type 'NoneType' is not iterable)
  • about 4 years TypeError: sequence index must be integer, not 'str'
  • over 4 years "invalid_grant", when request "/oauth/token........"
  • over 4 years Authentication via a JavaScript client without CLIENT_SECRET ?
  • almost 5 years "But it could be better, if you implemented"
  • about 5 years tokengetter method is not used
example-oauth2-server open pull requests (View All Pulls)
  • Return data for a good response - otherwise show error
  • Automatic redirection from user login
  • Add client_credential flow clients
  • Add three screenshots to explain what happens in the database when
  • add a MongoDB example
  • adds tests that run without a client server
example-oauth2-server list of languages used
Other projects in Python