Comments (8)
In order to be authenticated on the forum, some cookies must be set by the
forum into user's browser.
Try 1: handle setting cookies in API backend:
- handle forum login entirely inside the API backend;
- Proxy back the
Set-Cookie
to the UI.
In order to handle subdomains (api, ui and forum), thedomain
property need
to be set on the cookie, making it shared between all subdomains.
Strangely, the cookies where received by the browser but where not sent on subsequent requests. It also requires the 'withCredentials' option to be set on the angular service and the API backend modified.
Try2: handle setting cookies in an iframe:
- handle generation of the redirect URL in the API backend;
- Use a hidden iframe with the redirect URL (cookies are directly set by the forum).
This solution works almost correctly. The main drawback is an error printed in the console which could probably be workarounded.
I am going to prepare a PR based on try2.
from v6_forum.
Proxy back the Set-Cookie to the UI. In order to handle subdomains (api, ui and forum), the domain property need to be set on the cookie, making it shared between all subdomains.
Having domain-wide cookies might be a problem since other instances of the UI/API/forum will probably be set for test/dev purposes on the same domain (and would share the cookies then...).
from v6_forum.
@gberaudo can we update the todo list at the beginning of this issue?
What about the logout in Discourse pages? We need that the user is then also logged out from the UI.
See c2corg/v6_ui#203 (comment)
from v6_forum.
See https://meta.discourse.org/t/discourse-sso-logout/28509
from v6_forum.
Could you summarize? I don't have the patience to read the thead :P
from v6_forum.
There exists a redirect URL setting for logout. We can use it to redirect to the UI, handle the UI logout and redirect back to the forum.
from v6_forum.
The alternative is to hide the forum login/logout buttons with CSS.
from v6_forum.
That's not very intuitive to have to go to another page (UI) to be able to log out.
from v6_forum.
Related Issues (20)
- Recherche forum limitée à 50 résultats
- Ajouter aux messages une ID fixe HOT 2
- Chronologie des messages déplacés
- Boutons texte sousligné / barré HOT 1
- Color contrast (forum): citation in a message
- Empêcher la suppression d'un utilisateur
- Liste du groupe Association à masquer
- Bug dans la recherche utilisateurs en mode admin
- Modification de post sur smartphone
- Vote modifiable dans les sondages
- Conflicts between users HOT 15
- Upgrade Discourse HOT 5
- Error 503 on server HOT 1
- Access-Control-Allow-Origin on API HOT 1
- store uploads on S3
- healthcheck tuning
- pull logs into ELK
- Update the README install procedure
- enable CORS HOT 15
- Frequent unexpected logouts in Discourse HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v6_forum.