RE: How does standard 'send password' actually work
Hello,
Thank you for clarifying :)
Im using the safeParse-action through an XMLHTTPRequest:
XHR.open('POST', '" + getProgramCustomer() + "&action=safeParse&includeId=' + form.data('includeid') + '&key=' + form.data('key'));
It actually looks like it is not executed, so you are correct that this is not allowed as long as i have this 'special-cookie'.
"?action=logout" should remove it, yes, and i notice you should edit the default changeCust.thml as well.
Click 'preview as html':

Follow url:

The option 'logg out' does not work, as you have a restricted cookie:

If i'm not allowed to execute custom endpoints with a restricted cookie in my browser i guess "?action=logout" will have to do.
It need to remove the cookie and clean up the table though, as my main issue to begin with was that i get a new row in "login_customer" for each logon:
#setLanguageLevel 3;
SearchEngine se;
se.addFields("login_customer", "id,customer_id,session_key");
se.addCriteria("login_customer.customer_id", "Equals", "26493"); //26493 = my user
for(se.select()>0;!se.eof();se.next()){
printLine("id: " + se.getField(0) + ", customer_id: " + se.getField(1) + ", sessionKey: " + se.getField(2));
}
This gives me the result:

My custom endpoint handles this by deleting all rows for the customer_id, but i'm unsure if SuperOffice eventually deletes these(?)
Is there a default endpoint that accepts a form with username and password, and just sets the cookie?
Not really sure how i can use "?action=login" and "?action=logout" in a my custom CC, as everything is inside CRMscript and i havent included anything in the default .html-files.. Whenever i have tried using these i get routed back to the default CC, and if i e.preventdefault() and handle the stuff myself it looks like you return a whole webpage..
//Eivind