Not able to set display name and image using cookies

HI, I am trying to set the display name and image of user using cookies, but not able to set them as the code is fetching an empty string. However when I check for cookies they are available in the application tab. Could it be because of the fact that I am running jitsi on localhost and the name and image cookies are also set for localhost(but some other port)

Likely yeah, since it probably counts as a different origin.

So, how can I solve this issue?Like I have two diff domains and, is the domain on which user’s name and image have been set as cookies… so how should I access them in to be able to set the avatarUrl and displayName.
Also, I checked using domain.cookie method in the console of and it gives me the set cookies… but when accessing through reducer.js file using document.cookie I am getting an empty string

You may use querystrings if it’s applicable to your use case.

Can you please explain about querystrings I mean how to use them?

for example"DISPLAY_NAME"&"EMAIL""DISPLAY_NAME"&userInfo.avatarURL="some url"
I am using this link but it is not setting the avatarURL however displayname is being set

I don’t believe you can set the avatar like that. Jitsi pulls from gravatar, so if the user has an avatar in their gravatar profile, that gets pulled in when they enter their email.

Okay, so then can I pick display name and avatarURL from cookies? In my cookies section of application tab under the domain of I have all the details stored. I can access those details by using document.cookies in the browser but not able to access them through jitsi code(reducer.js file). Is there something you can help me with?
using this method to extract cookies

function getCookieSubdomain(cname) {
    const name = cname + '=';

    const ca = document.cookie.split(';');
    for (let i = 0; i < ca.length; i++) {
        let c = ca[i];

        while (c.charAt(0) === ' ') {
            c = c.substring(1);
        if (c.indexOf(name) === 0) {
            try {
                return JSON.parse(c.substring(name.length, c.length));
            } catch (e) {
                return c.substring(name.length, c.length);
    return '';
and my initsettings method is

function _initSettings(featureState) {
    let settings = featureState;
    let displayName = _.escape(jitsiLocalStorage.getItem('displayname'));
    let avatarURL = _.escape(jitsiLocalStorage.getItem('displayImg'));
    if (getCookieSubdomain('user_name')) {
        displayName = getCookieSubdomain('user_name');
    if (getCookieSubdomain('user_image')) {
        avatarURL = getCookieSubdomain('user_image');
    _.escape(jitsiLocalStorage.setItem('displayname', displayName));
    _.escape(jitsiLocalStorage.setItem('displayImg', avatarURL));
    const savedEmail = jitsiLocalStorage.getItem('email');
    const savedDisplayName = jitsiLocalStorage.getItem('displayname');
    let savedAvatarURL = _.escape(jitsiLocalStorage.getItem('displayImg'));
        = savedDisplayName === null ? undefined : _.escape(savedDisplayName);

        = savedAvatarURL === null ? undefined : _.escape(savedAvatarURL);
    const email = savedEmail === null ? undefined : _.escape(savedEmail);
    settings = assignIfDefined({
    }, settings);
    return settings;

I narrowed down my problem to the reason that cookies of one domain can’t be accessed on another domain

Can you share more details about the use case?
Do you have 2 Jitsi domains or one domain for authentication and another one for Jitsi?

No no, actually I have my parent website(call it A) and I open jitsi meet in an iframe of that website…but the domain on which my jitsi code is deployed is B and I want to pick name and avatarURL for my jitsi user from that website A’s cookies…

If you set useHostPageLocalStorage: true then when used with IFrame API, the localStorage data will be written against the domain of the page hosting the IFrame not the Jitsi host. So using your example, it would be stored against A domain instead of B.

Did you check JWT?

using JWT is not in accordance with our flow