Git Product home page Git Product logo

Comments (14)

avanov avatar avanov commented on July 20, 2024

I'd like to see this in the upstream too. It has been here for a month without any response, so I'd like to ask maintainers if there's any issue with that particular implementation. And if so, what can we help you to see this provider in the upstream as soon as possible?

from velruse.

avanov avatar avanov commented on July 20, 2024

@naktinis , I suppose it's necessary to make a pull request in either case.

from velruse.

mmerickel avatar mmerickel commented on July 20, 2024

Hello! Please don't hesitate to nudge me on these issues, I'm very busy outside of velruse but when there's interest I try to give it as much love as I can.

I'm glad to incorporate a google oauth provider. I was wondering if it was worth separating the api or simply integrating with the add_google_login() api by just adding some more options and in a future release deprecating the openid+oauth1.0 options.

from velruse.

avanov avatar avanov commented on July 20, 2024

Well, I think the best solution is to have a separate "private" module encapsulated into velruse.providers.google. Then we'd be able to do something like:

# velruse.providers.google
from . import  _google_oauth2

def add_google_login(..., protocol='oauth1'):
    # ...
    provider = _google_oauth2.GoogleProvider() if protocol == 'oauth2' else GoogleConsumer()
    # ...

In the future, if Google decides to remove OAuth1 protocol completely, we can merge this private module into velruse.providers.google.

from velruse.

mmerickel avatar mmerickel commented on July 20, 2024

I think google.py should be turned into a package where google/__init__.py contains the includeme/setup functions and google/hybrid.py contains the current provider and google/oauth2.py contains your new provider. What do you think?

Also I agree that the protocol switch is a good idea.

from velruse.

avanov avatar avanov commented on July 20, 2024

Yes, I completely agree with you.

P.S. The module is provided by @naktinis

from velruse.

andornaut avatar andornaut commented on July 20, 2024

Just adding my support for this feature request.

from velruse.

mvliet avatar mvliet commented on July 20, 2024

I'd also like to add my support for this feature. I'd love to see this integrated soon.

from velruse.

naktinis avatar naktinis commented on July 20, 2024

If it's ok with everyone, I will refactor google provider into a package, add the protocol switch and start a pull request.

from velruse.

mmerickel avatar mmerickel commented on July 20, 2024

+1

from velruse.

naktinis avatar naktinis commented on July 20, 2024

I think this can be closed now, see 74d6148.

from velruse.

mmerickel avatar mmerickel commented on July 20, 2024

I was looking into cutting a release but this just isn't adding up API-wise. The context needs to be exposed as an API and it can't simply be GoogleAuthenticationComplete because that one already exists and subclasses OpenIDAuthenticationComplete, thus we have a naming clash.

I'm seriously considering removing the current google provider entirely because most of it can be covered by the current OpenID provider and the OAuth1.0 part of the protocol is now deprecated. At which point the "google" provider would just be the new OAuth2 implementation. I might be able to justify this because I am not familiar with any users of the hybrid system, but it does feel irresponsible. Right now I'm bouncing between doing this and/or naming it google_oauth2, but that's what's holding me up.

from velruse.

avanov avatar avanov commented on July 20, 2024

I think we should name it google_oauth2 and wait until Google officially closes down hybrid API. At that point we would have a fair reason to remove current default provider from the library.

from velruse.

mmerickel avatar mmerickel commented on July 20, 2024

So I've pushed this as google_oauth2 and renamed the original implementation to google_hybrid. I've left in a bw-compat shim in velruse.providers.google that makes it work the same as google_hybrid. Released 1.0.2.

from velruse.

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.