simov / grant

OAuth Proxy
MIT License
4.08k stars 257 forks source link

Add crossid provider. #260

Closed asaf closed 2 years ago

asaf commented 2 years ago

Add the crossid provider

working configuration:

{
    "defaults": {
      "origin": "http://localhost:3005",
      "transport": "session",
      "state": true
    },
    "crossid": {
      "subdomain": "acme",
      "key": "my_client_id",
      "secret": "my_client_secret",
      "scope": [
        "openid"
      ],
      "callback": "/hello",
      "response": ["tokens", "raw", "profile"]
    }
  }
simov commented 2 years ago

Thanks, rebased and merged here https://github.com/simov/grant/commit/7a28be92e7f1e0c7de1dd9732bea40a75dc60219 but github is not picking it up ..

asaf commented 2 years ago

@simov looks like master has https://github.com/simov/grant/commit/7a28be92e7f1e0c7de1dd9732bea40a75dc60219 commit so we'r good.

What's the ETA for a new release for grant-koa?

Strapi uses grant-koa, I guess once published I'll need to create a PR for them as well.

Many thanks.

simov commented 2 years ago

Generally speaking you should be able to use crossid with Strapi even today, see this. As for grant-koa .. I didn't know that they have pinned the version in Strapi, but then again Grant is referenced with a ^ there so your npm install should pick the latest version of Grant regardless of what version of grant-koa you have in Strapi.

As for the release I will be looking at a few other things to add, but let me know if the above works for you in the meantime.

asaf commented 2 years ago

@simov I'm not sure where these configurations overlays should go in Strapi,

I had to add crossid to https://github.com/strapi/strapi/blob/master/packages/strapi-plugin-users-permissions/config/functions/bootstrap.js and to https://github.com/strapi/strapi/blob/master/packages/strapi-plugin-users-permissions/services/Providers.js#L126 for things to work :)

asaf commented 2 years ago

@simov any chance of releasing a patch version for this? thanks.

simov commented 2 years ago

Sure I will do that tomorrow.

simov commented 2 years ago

Published in v5.4.18

asaf commented 2 years ago

Awesome, thanks pal!