lisaah/emojiporter

workaround for SSO

Closed this issue · 4 comments

gjw commented

So is there a workaround if your mattermost doesn't actually have 'passwords' but relies on SSO from gitlab or the like?

Not off the top of my head based on the current JS driver, but I can take a better look when I have more time.

From what I can tell, you can't login to authenticate via SSO in the API without some HTML parsing in v3. Looks like some v4 changes coming up might be able to support it.

In the mean time, added a workaround where you can provide your Mattermost id and token yourself instead of having the login generate your token and fetch your id. Should be available in the latest, 0.1.0. You can see this id and token by logging in via the browser and checking your cookies (MMAUTHTOKEN, MMUSERID). Just add true at the end of the initial command such as emojiporter export true to authenticate this way.

Hope that helps!

gjw commented

Fantastic, thanks.

I'm running into issues with use true and the info from cookies for this. Getting 404 which I shouldn't be. team id and MMAUTHTOKEN and MMUSERID are correct.

Should MMCSRF be used for something now in the cookie for auth?