If I am understanding correctly, you need a Javascript Action that would get the logged in user in the browser. This javascript action could then be called by a Nanoflow to get the logged in account. I created a simple javascript action to get the currently logged in user. Here is the javascript:
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import "mx-global";
import { Big } from "big.js";
// BEGIN EXTRA CODE
// END EXTRA CODE
/**
* @returns {Promise.<MxObject>}
*/
export async function GetCurrentUser() {
// BEGIN USER CODE
return new Promise((resolve, reject) => {
mx.data.get({
guid: mx.session.getUserId(),
callback: resolve,
error: reject
});
});
// END USER CODE
}
Hope that helps,
Mike
Hi Mike,
As a anonymous user when trying to loggin, i want to see the browser logged in user not the Mendix session id.
Please let me know if that is possible!
Thanks!
Jhansi Mora