-
-
Notifications
You must be signed in to change notification settings - Fork 24
OIDC plugin #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OIDC plugin #158
Conversation
Awesome :D |
arf... but views directory must be outside /src to preserve path when you build application |
Do you mean that |
Exactly the views isn't copied by the yarn buid / tsc. It's normal, this is why I prefer to set the views outside src to preserve the relative paths between |
It looks like NestJS also has |
Yes sure but the build is performed by |
🎉 This PR is included in version 3.10.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
@stefanvanherwijnen I released a new version with two fix:
the release is on going. You will be able to test your works with the v3.10.2 |
Line 10 in 67a0a69
InteractionCtrl is not and should not be mounted at the oidc basePath 😉. Interactions are completely separate from oidc-provider. https://github.com/panva/node-oidc-provider/blob/main/docs/README.md#user-flows |
Actually, it seems to work fine. I expected oidc-provider to return a 404. this.rootRenderer.renderAll(
[
"/src/config/oidc/index.ts.hbs",
"/src/controllers/oidc/InteractionsCtrl.ts.hbs",
"/src/interactions/ConsentInteraction.ts",
"/src/interactions/CustomInteraction.ts",
"/src/interactions/LoginInteraction.ts",
"/src/models/Account.ts",
"/src/services/Accounts.ts",
"/views/forms/interaction-form.ejs.hbs",
"/views/forms/login-form.ejs.hbs",
"/views/forms/select-account-form.ejs.hbs",
"/views/partials/footer.ejs",
"/views/partials/header.ejs",
"/views/partials/login-help.ejs.hbs",
"/views/interaction.ejs",
"/views/login.ejs",
"/views/repost.ejs.hbs"
].filter(Boolean),
ctx,
{
templateDir: `${TEMPLATE_DIR}/init`
}
) |
Ok. I didn't know that but it doesn't make a lot of sense to me. There is no security reason behind that that would impose this kind of rule. ^^ I correct the cli suddenly. |
My guess was that because oidc-provider is its own koa instance, mounting |
Line 10 in ac500c2
Should be just "/interaction/:uid" now. With that change it all seems to work. |
Fix is on going. Thanks for your help ;) |
I moved the swagger views directory to the
src
folder because otherwise there would be two root dirs in the views Configuration.I tested initializing a project with either swagger or oidc, and both and everything seems to work.
The src folder which is copied in the cli-plugin-oidc-provider is basically a copy of the test/app folder in the oidc plugin and thus matches the documentation 1:1.
"OpenID Connect provider" can be selected as a feature and everything should work out of the box (apart from the correct OIDC configuration). Generating OIDC configurations with the CLI could possibly be a feature in the future by rendering it into oidcConfig.hbs (e.g. defining clients on initialization).