Skip to content
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

GSLUX-749: Auto auth with cookies and adapt for v3 #165

Merged
merged 4 commits into from
Oct 23, 2024

Conversation

AlitaBernachot
Copy link
Contributor

@AlitaBernachot AlitaBernachot commented Oct 22, 2024

JIRA issue

https://jira.camptocamp.com/browse/GSLUX-749

Description

Finalize auth form component.

  • improve/fix lib build for dev
  • allow authentication through localhost:8080 in standalone app
  • fix/adapt auth-form component to be integrated in v3
  • added new doc in readme regarding auth configuration

Copy link
Contributor

GitHub Pages links: * Luxembourg-geoportail: https://geoportail-luxembourg.github.io/luxembourg-geoportail/GSLUX-749-auth-finalize/

Copy link
Contributor

@tkohr tkohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice @AlitaBernachot, thanks for the clean PR!

Authentication works within the v3 docker composition using the lib, but I get CORS errors in v4 using v3 as the backend:
image

May there something be missing regarding ALLOW_CORS=1 in your other PR? Or may I have missed something 😄 ?

.babelrc Show resolved Hide resolved
.env.staging Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
src/services/auth/auth.service.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@tkohr tkohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so as we saw it was just the ALLOW_CORS missing in my docker-compose vor the v4 to work :-) Everything works fine now. Maybe also worth noting that the v4 still needs a CORS browser plugin for dev.

@@ -9,7 +9,7 @@
"build": "run-p type-check build-only",
"build-only": "vite build",
"build:lib:prod": "npx vite build --mode prod --config vite-dist.config.ts --minify=esbuild --debug && npx babel bundle/lux.dist.mjs --out-file bundle/lux.dist.js",
"build:lib:dev": "npx vite build --mode staging --config vite-dist.config.ts --minify=false --base=/dev/main.html/ --debug && cp bundle/lux.dist.mjs bundle/lux.dist.js",
"build:lib:dev": "npx vite build --mode staging --config vite-dist.config.ts --minify=false --base=/dev/main.html/ --debug && BABEL_ENV=dev npx babel bundle/lux.dist.mjs --out-file bundle/lux.dist.js",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so I just noticed that this is essential for the lib build to work in v3 once the updates in https://github.com/Geoportail-Luxembourg/luxembourg-geoportail/pull/163/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519 are installed (cc @mki-c2c, @tonio, so you don't fall in the same trap I did)

@AlitaBernachot AlitaBernachot merged commit dac4327 into main Oct 23, 2024
2 checks passed
@AlitaBernachot AlitaBernachot deleted the GSLUX-749-auth-finalize branch October 23, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants