Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • David Armitage 510 posts 2082 karma points
    Dec 27, 2019 @ 07:45
    David Armitage
    0

    Umbraco8 ContentApp - Where to store user settings

    Hi Peeps,

    A question regarding creating contentApps for Umbraco8.

    An App I am creating requires storing third party api credentials which are user specific.

    Where would the best place to store these be?

    Would these just go in the web.config and then I need to add some deployment notes along with the app when it comes to publishing. That or a config file within my App_Plugin folder?

    Are is there a better place to store these to make then easily configurable in the Umbraco backend?

    Thanks in advanced.

    David

  • Graham Davis 110 posts 376 karma points
    Dec 29, 2019 @ 05:34
    Graham Davis
    100

    Hi David,

    Is this a single app that is used by multiple users via a central website/login? A little more info would help.

    If there are only a few credentials that they all share, the webconfig in the app_plugin would probably be you best bet. If the number of credentials increases with the number of users, look at using a database table.

  • David Armitage 510 posts 2082 karma points
    Dec 31, 2019 @ 10:38
    David Armitage
    0

    Hi Graham,

    This is for an App I plan to publish into the Umbraco packages library.

    There is only a few settings. Actually probably one. An API key which will be set by the user.

    I had already added them into web config but I was just wondering if there is any other recommend place we should be adding these. Such as possible within the package.manifest or somewhere like that.

    After digging around I found some references to Package Actions and it seems that you can create a package action to add these types of settings automatically to the web.config when someone installs my package.

    Thanks @paulseal. https://24days.in/umbraco-cms/2017/creating-and-publishing-a-package/

    This sort of answered my question as I can see other people are saving these types of settings in to the web.config too. That can I learn a good way how to have these auto populated with some default config.

    How this helps someone with a similar question.

    Kind Regards

    David

  • Graham Davis 110 posts 376 karma points
    Dec 31, 2019 @ 12:57
    Graham Davis
    0

    The appsettings section of the web.config in the root folder would be the appropriate place.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies