Giter VIP home page Giter VIP logo

Comments (9)

daffl avatar daffl commented on September 28, 2024

Isn't this a duplicate of feathersjs-ecosystem/authentication#576?

from authentication-oauth2.

nabeards avatar nabeards commented on September 28, 2024

I suppose that it is! Since it appears to be an issue with this repo and not that one, I didn't think to look there for the issue. Sorry about that.

from authentication-oauth2.

nsainaney avatar nsainaney commented on September 28, 2024

You're both right. I've submitted a PR that proposes a solution. Not sure if extending the strategy options is part of your design principles but it works well.

from authentication-oauth2.

nabeards avatar nabeards commented on September 28, 2024

Is there a reason not to send the full oauth2settings object? Just curious.

from authentication-oauth2.

nsainaney avatar nsainaney commented on September 28, 2024

@nabeards I suppose you're right. It's not like there will be any conflict in the settings. I'll update my PR

from authentication-oauth2.

nsainaney avatar nsainaney commented on September 28, 2024

@nabeards, @daffl

Do you think the call to:

    app.get(oauth2Settings.path, auth.express.authenticate(name));

should pass in oauth2Settings or oauth2Settings[name]? In other words, for google, oauth2Settings.google subdocument will be passed in.

from authentication-oauth2.

nabeards avatar nabeards commented on September 28, 2024

I think the 'google' subdoc from the current config file is what oauth2Settings is populated with now.

"google": {
    "clientID": "GOOGLE_CLIENT_ID",
    "clientSecret": "GOOGLE_CLIENT_SECRET",
    "callbackURL": "GOOGLE_CALLBACK_URL",
    "successRedirect": "GOOGLE_SUCCESS_REDIRECT",
    "accessType": "offline",
    "includeGrantedScopes": true,
    "scope": [
        "openid",
        "profile",
        "email",
        "https://www.googleapis.com/auth/drive.readonly",
        "https://www.googleapis.com/auth/drive.metadata"
    ]
},

Are you suggesting a structure like this?

"google": {
    "clientID": "GOOGLE_CLIENT_ID",
    "clientSecret": "GOOGLE_CLIENT_SECRET",
    "callbackURL": "GOOGLE_CALLBACK_URL",
    "successRedirect": "GOOGLE_SUCCESS_REDIRECT",
    "google": {
        "accessType": "offline",
        "includeGrantedScopes": true,
        "scope": [
            "openid",
            "profile",
            "email",
            "https://www.googleapis.com/auth/drive.readonly",
            "https://www.googleapis.com/auth/drive.metadata"
        ]
    }
},

Seems redundant to have google.google. Just my 2ยข.

from authentication-oauth2.

nsainaney avatar nsainaney commented on September 28, 2024

No I was proposing your first example. I'll send a PR today.

"google": {
    "clientID": "GOOGLE_CLIENT_ID",
    "clientSecret": "GOOGLE_CLIENT_SECRET",
    "callbackURL": "GOOGLE_CALLBACK_URL",
    "successRedirect": "GOOGLE_SUCCESS_REDIRECT",
    "accessType": "offline",
    "includeGrantedScopes": true,
    "scope": [
        "openid",
        "profile",
        "email",
        "https://www.googleapis.com/auth/drive.readonly",
        "https://www.googleapis.com/auth/drive.metadata"
    ]
}

from authentication-oauth2.

daffl avatar daffl commented on September 28, 2024

Closed via #42

from authentication-oauth2.

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.