GithubHelp home page GithubHelp logo

Google logins about hknweb HOT 3 OPEN

jameslzhu avatar jameslzhu commented on June 27, 2024
Google logins

from hknweb.

Comments (3)

GeoHutch avatar GeoHutch commented on June 27, 2024

CalNet is Apero CAS, which is definitely not a popular protocol for libraries like this to support. There is a 3rd-party plug-in for django-allauth, https://github.com/aureplop/django-allauth-cas . Allauth is pretty heavy for our use case, but it seems nice enough to use. Explored it some in my fork.

from hknweb.

jameslzhu avatar jameslzhu commented on June 27, 2024

When we implement this with Google OAuth credentials with the hkn-ops account, we'll need to add the following entries to the secrets.py (encrypted):

SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = '...'
SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '...'

source: https://python-social-auth.readthedocs.io/en/latest/developer_intro.html

from hknweb.

jvperrin avatar jvperrin commented on June 27, 2024

ocfweb does calnet auth, and it doesn't seem too bad, although I'm not sure if it needs any kind of registration with the university to get it all set up.

There's this decorator (https://github.com/ocf/ocfweb/blob/54a90774442bbef072185d338129c942b582661b/ocfweb/auth.py#L44-L62), added to paths that need auth (probably would need one for general auth and then a selection between google apps and calnet on a separate page?). I do think CalNet auth would be pretty valuable, most crucially for candidates, since they don't have a HKN email but should all have CalNet logins.

Some other relevant code snippets:
https://github.com/ocf/ocfweb/blob/9a138f8819040279554bc1b3bc83a18199239346/ocfweb/login/calnet.py
https://github.com/ocf/ocflib/blob/8776681464253c710aca7f963eeff6b662635a2b/ocflib/ucb/cas.py
https://github.com/ocf/ocflib/blob/8776681464253c710aca7f963eeff6b662635a2b/tests/ucb/cas_test.py

from hknweb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.