Issue with cookie ‘_ms-mid Answered
Hello,is the ‘_ms-mid’ cookies deprecated? I’m using memberstack2.
after I login in, this cookie ‘_ms-mid’ is not generated, but a few days ago it exists.
Hello,is the ‘_ms-mid’ cookies deprecated? I’m using memberstack2.
after I login in, this cookie ‘_ms-mid’ is not generated, but a few days ago it exists.
Comments
30 comments
It shouldnt be - I was doing something yesterday with it and it worked perfectly fine
Yes, I found it put inside the LocalStorage, not in cookies anymore, is there any announcement about this change?
I still see this, it's what tracks the session so i dont think its gone anywhere
Can you log out and log in again, and then check the _ms-mid which is still in the cookies?
it's still there for me!
ok, thank u very much! Do you use memberstack2?
I do! Feel free to send me your site and I can test from my side
ok, are you the stuff of ms company?
my site is under development, which url is https://www.jobwizard.ai
login url: https://www.jobwizard.ai/login
thank u!
I am! And I will try now 🙂
👍
this is strange, and it's definitely the first time I've seen it - everything is exactly as you described.
CC Tyler Bell Josh Lopez
Any idea about this? The _ms-mid is actually going to the local storage, instead of cookies - see photos
The cookie is deprecated. Local storage is used now.
We made the switch to local storage because of compatibility issues with Safari.
Julian, this is what my post about cookies was about yesterday.
Julian if you logged out and logged back in and still see a cookie, it most likely is because your browser is still using the old MemberStack script version. A quick cache clear should fix that. M
My apologies - I fixed the script for the concurrent login solution - zhaojun wang if you need any help with switching your implementation, just let me know 🙂
We are using the chrome plugin, which is running in a third-party web page to start the chrome plugin to read the value of _ms_mid, and submit it to the back-end and then using JWT to verify the token. After changing it to LocalStorage, our chrome plugin can’t read the value of ‘_ms_mid’ , because chrome extension running in the third-party website(eg. https://boards.greenhouse.io/amwell/jobs/6674651002), and ‘_ms-mid’ stores in our webflow site(www.jobwizard.ai)
Is there any good solution?
You should be able to do exactly what you're doing and just pull the info from the localstorage instead of the cookie data - check this out https://stackoverflow.com/questions/3937000/chrome-extension-accessing-localstorage-in-content-script
I attempt to get the value of ms-mid, but return undefined.
May be I think the _ms-mid value is in the localstorage of page www.jobwizard.ai (photo1 below), but our chrome extension runs in greenhouse page(photo2 below).
the chrome extension api for localstorage is(we can see, no domain parameter that is different from cookies):
as we know so far, we cant read the value of _ms_mid right now in our chrome extension after change to localstorage. Is that possable to give us a choice to reserve ms-uid cookies?
Are you using the webflow package or the dom package?
I am using this code below, and insert this code into webflow header area.
Can you do something like this then?
yes , I tried just now, return the cookie of the current user like this, is this the same value as _ms-mid?
eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IjZmNjU3ZGRiYWJmYmZkOTVhNGVkNjZjMjMyNDExZWFhNjE5OGQ4NGMxYmJkOGEyYTI5M2I4MTVmYjRhOTlhYjEifQ.eyJpZCI6Im1lbV9jbGc1NmgzN3MwM2NuMHJlNTZhMGVjZmE5IiwidHlwZSI6Im1lbWJlciIsImlhdCI6MTY4MTgzMzA4MSwiZXhwIjoxNjgzMDQyNjgxLCJhdWQiOiJhcHBfY2xnMWtmbDgxMDAzbjB1bGlkcWJ0YjFjMiIsImlzcyI6Imh0dHBzOi8vYXBpLm1lbWJlcnN0YWNrLmNvbSJ9.gUZ1zMVsK38c1e0xGM2CX5YTp9RwGE23syHroq7q3abOp1uUDoBAZP9HHZQ4Zzm2bzZItIhTGb8K3Txczwqgls6yFBMjJ0hKid207eXV29Ramp1JBJlthFn1tdGZQguUNa1riHGdUVUF7Z-WxCpv2cpXZMUO72-mzdyfgYnBkpuBI6beXIX1b-m91hA_10XTAWMVQ4sDILZyx8ReSHz_d2C4XiTz6W4SVW0Eq3JZrgf18OgyPZAUmqm7-QdRPln6yWdXSyVxoaUw2dXzWjxNf429dZBmmHGg_yufUz3ys7DOKBdWGUNrarmiJhRz4-mnh3-CgHSKA9jzkqupYkKpZg
Yep!
And what can wedo as follows, you means that we manage this cookie by outself, add this cookie when login and remove it after logout?
You shouldn’t need to manage anything by yourself.
What are you trying to do?
Is your chrome extension no longer working?
yes, It’s no longer working right now. Our chrome extension could not read ms-mid value from localstorage, as the extension runs in the third party webiste.
You can read the value with
disregard the name of the method. It pulls the value from localstoragge
ok, but the code “window.$memberstackDom.getMemberCookie()” cannot run in the chrome extension.
we need a cookie that can be read by the chrome extension.
Does the chrome extension not have permission to access local storage?
the chrome extension just have permission to read local storage of the current page.
but the chrome extension runs in the third party page, in our case, for example, our extension runs in greenhouse page.
so, in our case, the extension do not have a way to read the localstorage of ‘_ms-mid’
Tyler Bell Is it possible to provide an option to generate a ms_mid cookie after the user logs in?
If you are using the webflow script just add data-memberstack-use-cookies to the script tag. So you’d have something like…
If you are using the dom library, you can just pass in useCookies:true to the init function.
@zhaojun wang please see my above message.
We added a feature where you can still use cookies.
thank you!!!👍👍
Please sign in to leave a comment.