Authorization: programmatically get the SafeBrowser response


#1

In my understanding, that’s how to get authorized (using the NodeJS lib):

  1. Call auth.genAuthUri: it will return an URL like “safe-auth:AAABC2387…”;
  2. Open this URL on SafeBrowser (can be programmatically done with an “open” system call);
  3. SafeBrowser will return on terminal an response string;
  4. Call fromAuthURI passing the response string as argument;

Problem is that asking to the user to copy/paste the response string is not practical.

Is there a way to be authorized without asking the user to copy and paste strings?


#2

In my understanding (and I’m still playing catchup with the authenticator paradigm and mutable data), when packaged and registered with the system your app will be triggered with a response from the authenticator which will automagically pass the required response (string here) to your app for you to continue with your SAFE work.

Currently this doesn’t work (for me) in development as the application is in no way registered on the system so the browser/authenticator cannot find it to pass the response.

The setup with the terminal / string setup is temporary, insofar as I understand.


#3