-
Notifications
You must be signed in to change notification settings - Fork 2
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
I can Login into the admin ui and see a preview of a private pages (pass auth token) #6
Comments
@MAX-786 as discussed this needs to allow you to see private urls in the frontend after you login. so it needs to send the auth token to the frontend preview so the frontend is now logged in also |
@MAX-786 I changed the title to "I can Login into the admin ui and see a preview of a private page" because the key thing about this task is to ensure the auth token is passed to the frontend so it is accessing content as the same user so therefore can see private content that public can't see |
@MAX-786 as discussed. either we can set the cookie in the hydra.js with the token and that means we never have to login with the plone client. or else have to use a modified branch of the client code that accepts a auth token. |
@djay @JeffersonBledsoe I Looked into plone/client and Voila! found this:
const client = ploneClient.initialize({apiPath: 'http://localhost:8080/Plone/', token: ''});
IG this will be feasible and proper solution to this issue. What do you guys say? |
@MAX-786 Great find! Yeah, I'd file an issue to document this feature a little better, looks it should do exactly what we need though. Only thing you'd need to make sure of is that whenever the token changes in the admin window (e.g. whenever the 12 hour bearer token expires and needs to be re-authenticated or the user logs out), that is passed down to the plone client within the frontend through the bridge. Volto handles this currently using the login renew endpoint in the |
Please do create an issue and PR. As far as where to add this to the documentation, |
Yep sure, but I guess Jeff is gonna file an issue.
https://6.docs.plone.org/volto/client/quick-start.html#ploneclient-entry-point This is the place where it states about how to initiate a client, so IMHO better to add a line about the token option here because it is related with initializing the authenticated user. |
@MAX-786 no reason why you can't raise the pr. |
Oh sure sure |
I forgot we have that! Yes, please do. |
|
@JeffersonBledsoe I did this and whenever the token is updated the Volto-Hydra updates the token which is being sent via postMessage. |
Description
As an editor, I want to Login into the admin UI and see the toolbar appear so that I can be authenticated to view/edit content.
Technical Approach
Since our first approach is building an addon for volto, so setting up an addon using
cookieplone
which will be a good starting point , we can depend on volto to provide UI for logging in and let Plone authenticate the user (editor).Follow up
The text was updated successfully, but these errors were encountered: