Hi,
I am also stuck at the same point. after getting the access_token, mx.session.storeToken is not accessible and not storing the token. Hence, not able to login via authenticated user.
To handle this error, i have put the try catch and tried to strore token in async/local storage. still, no luck.
try {
if (mx && mx.session && mx.session.tokenStore && typeof mx.session.tokenStore.set === "function") {
await mx.session.tokenStore.set(Token);
console.info("Token stored in Mendix session successfully.");
} else {
console.info("Mendix session tokenStore is not available. Skipping storage.");
}
// 2. Store the authentication token in AsyncStorage for persistence
await AsyncStorage.setItem('authToken', Token);
console.info("Actual authentication token stored in AsyncStorage successfully.");
} catch (error) {
console.info("Error storing tokens:", error);
return Promise.reject(new Error("Error storing tokens: " + error));
}