Skip to main content

Hi, I’ve built a front sidebar plugin a couple of years ago and I was using the auth_secret to authenticate the users from front to my app, before I was doing something like:

export function getInstallationInformation(callback) {
callback = once(callback);
Front.contextUpdates.subscribe(context => {
callback({authSecret: context.preferences.authSecret});
});
}

Now I’m refactoring the plugin, and I noticed that in the docs it says that the auth_secret is going to be sent in the URL.

Does front still support the the context.preferences ?

Thank you!

Hi, The context.preferences object is still present in the v1.x plugin SDK, but it will not contain the auth_secret. As you pointed out, this will be provided as a query string parameter in the plugin URL only. 

 

 


Hi Jason, thank you for your answer!

But is it still gonna be configurable by the user? because the way we do it is, we provide an auth_token and they have to add it to the settings, is it still the case?

Thank you very much!


Yes - the user can still configure the plugin URL (and query string params) to be whatever they need. 
Front will append an auth_secret parameter matching the Auth Secret key in the plugin app config.

So for the example pictured below, the actual URI being requested would be;

https://front-plugin.example.com/auth_token=abc123?auth_secret=984cc92fb2ced266

You can have your users set an auth_token param for your own use and reach that on connecting. 

 

It’s also possible to configure authentication via OAuth, or having the user enter something like an auth token, then setting a cookie for their browser session. 

 

 


Awesome! thank you very much Jason!


Reply