I am sending Auth data from Client to safe network and safe Authenticator send me back response.
How do I catch The response??
I am using Electron-react boilerplate in front end.
I am using this code from sending Auth request to safe network
Blockquote
console.log(‘Authorising SAFE application…’);
const appInfo = {
// User-facing name of our app. It will be shown
// in the Authenticator user’s interface.
name: ‘Hello SAFE Network’,
// This is a unique ID of our app
id: ‘net.maidsafe.tutorials.desktop-app’,
version: ‘0.1.0’,
vendor: ‘MaidSafe.net Ltd.’,
bundle: ‘com.github.electron’,
customExecPath
};
const opts = {
forceUseMock: true
};
safeApp = await safeNodeApp.initialiseApp(appInfo, null, opts);
const authUri = await safeApp.auth.genAuthUri({});
await safeApp.auth.openUri(authUri);
Have you initialized the customExecPath variable?
From the Node JS tutorial the variable should be intialized as follows before creating the appInfo variable.
Once appInfo is initialized correctly with the customExePath set, when we call the initializeApp API, a custom URI for your application is registered. Once the authenticator authorizes your application it opens the uri which has the authorization string response.
Further down in the tutorial you will see how the uponAuthResponse function receives this auth response and calls the loginFromUri API to establish a connection to the network.