https://github.com/cthoyt/flask-dance-with-redirects

Extend Flask-Dance to handle URL redirects

https://github.com/cthoyt/flask-dance-with-redirects

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (7.4%) to scientific vocabulary

Keywords

flask flask-dance oauth oauth1 oauth2
Last synced: 5 months ago · JSON representation

Repository

Extend Flask-Dance to handle URL redirects

Basic Info
  • Host: GitHub
  • Owner: cthoyt
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 13.7 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
flask flask-dance oauth oauth1 oauth2
Created over 1 year ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

flask-dance-with-redirects

This repository gives an example of how to extend Flask-Dance to handle URL redirects when doing the OAuth2 dance for you.

There's a quick note in https://flask-dance.readthedocs.io/en/latest/understanding-the-magic.html#finishing-the-dance on how this can work in a different way, but it seems a bit magic. This demo is a bit more explicit and contains a full example!

First, you'll need to get API credentials for ORCID at https://orcid.org/developer-tools and set up a redirect for https://0.0.0.0:8775/login/orcid/authorized. You can swap out many different OAuth2 sources by using Flask-Dance - ORCID is just for demo purposes.

Second, you'll need to clone the repository, install requirements, and create security credentials to get your local server to (begrudgingly) run HTTPS:

```shell git clone https://github.com/cthoyt/flask-dance-with-redirects.git cd flask-dance-with-redirects

needed to make appropriate security credentials

brew install mkcert brew install nss mkcert localhost 127.0.0.1 ::1 mkcert -install

uv run app.py ```

Finally, navigate to https://0.0.0.0:8775 to see the dance.

You can look inside app.py for more detailed instructions on what's going on.

Owner

  • Name: Charles Tapley Hoyt
  • Login: cthoyt
  • Kind: user
  • Location: Bonn, Germany
  • Company: RWTH Aachen University

GitHub Events

Total
  • Push event: 1
Last Year
  • Push event: 1

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 7
  • Total Committers: 1
  • Avg Commits per committer: 7.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 7
  • Committers: 1
  • Avg Commits per committer: 7.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Charles Tapley Hoyt c****t@g****m 7

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • asgiref *
  • flask *
  • flask-dance *
  • pystow *
  • uvicorn *