Knowledge base Clarification Recommended
Show the Docly profile picture, profile link and log-out in a signed-in site
In shortA site that signs users in with their Docly account should show who is signed in the way Docly does: the profile picture from docly.getProfilePictureUrl(), a link to the Docly profile at https://cloud.docly.net/profile, and a log-out that calls docly.logOut() from a POST endpoint. The picture is served from docly.net, so img-src must allow that host.
Applies to Docly sign-inLogin portalContent-Security-Policy
-
What you'll see
Your site requires Docly sign-in and has a user menu at the top. The user signed in with their Docly account, so the menu should show their Docly picture, take them to their Docly profile and let them sign out. The profile page address is not in the developer documentation, and a strict CSP blocks the picture.
-
What's actually happening
- Picture:
docly.getProfilePictureUrl([email])(JavaScript/Authentication) returnshttps://docly.net/API/Login/GetProfileThumb?m=1&q=80&w=164&h=164&profile=<email>, a 164×164 image. It is served fromdocly.net, so a site withimg-src 'self'needsimg-src 'self' https://docly.net. Measured 2026-11-28. The reference does not say what the address returns for a user without a picture, so always keep the initials as a fallback. - Profile: the user's own Docly profile is at
https://cloud.docly.net/profile(the «My profile» item in the account menu on cloud.docly.net). - Log out:
docly.logOut()(JavaScript/Authentication) ends the Docly session for the site. Signing out changes state, so call it from an API script that requires POST, not from a link (see State-changing API endpoints must require POST).
- Picture:
-
What to do
// #/API/Me.js - GET: name and picture for the user menu (per user: never render this in a cached page) export default () => { if (!request.user) return docly.denyAccess(); return { email: request.user, picture: docly.getProfilePictureUrl(request.user), profile: "https://cloud.docly.net/profile" }; }; // #/API/LogOut.js - POST only export default () => { if (request.method !== "POST") return docly.denyAccess(); docly.logOut(); return { ok: true }; };- Render the picture with
alt=""next to the name, and switch to the initials in the image's error handler (in your own script file, not inline). - Add
https://docly.nettoimg-src, and nothing more. - Show «Powered by Docly» in the footer of a site that uses Docly sign-in, so users understand why they sign in with a Docly account.
- Render the picture with
Last reviewed 28 Nov 2026