SSO Login RedirectURL Stuck

0
HI, I an encountering an error while using a staging release. When login with Azure SSO callback URL is retrieved with token. Getting error in Javascript actions called from nano flow "MobileSSO.SUB_HandleLoginDeeplink".  Error log from Xcode and AndroidStudio shows:   { [Error: undefined is not an object (evaluating 'mx.session.tokenStore.set')   Nanoflow stack: "Call JavaScript Action" in nanoflow "MobileSSO.SUB_HandleLoginDeeplink"   "Call nanoflow: MobileSSO.SUB_HandleLoginDeeplink" in nanoflow "MobileSSO.HandleDeeplink"    "Return" in nanoflow "MobileSSO.OL_RegisterDeeplink"]   innerError: [TypeError: undefined is not an object (evaluating 'mx.session.tokenStore.set')],   nanoflowStack: ' "Call JavaScript Action" in nanoflow "MobileSSO.SUB_HandleLoginDeeplink"\n  "Call nanoflow: MobileSSO.SUB_HandleLoginDeeplink" in nanoflow "MobileSSO.HandleDeeplink"\n   "Return" in nanoflow "MobileSSO.OL_RegisterDeeplink"' }
asked
1 answers
0

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));

}

answered