-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save access token to DB #12
Comments
Just had a thought... could this be achieved simply by storing the long access token in a craftagram specific config table in the database (an approach used by some other plugins I've seen), rather than being stored in the project config? |
Is this an instagram restriction or a restriction in our plugin? I don't think we have put in any checks on whether the I agree regarding storing the token in the database. I hadn't considered project configs would get out of sync! |
The non-HTTPS thing is an instagram restriction. It could probably be worked around using ngrok now I think of it, although might not need to if you just don't bother setting it up on production / staging environments. The project syncing thing is something I've come across with a couple of other plugins also, it's an awesome feature usually, but sometimes plugin settings can end up overwriting themselves, as everything will be synced with your development project.yml. Another thing to consider though is how to connect / install the instagram on production environments which may have allowAdminChanges: false — as you can't access or update settings section or plugins if this is set. Some other plugins I've seen have a work around where they add in a new item to the main craft menu (left hand sidebar) where you can do the instagram authorisation action. |
Having the same problem with the multi environment. |
@isjackwild 1.2.0 is available and will store the long-access token in the database. It also has a CP section available. |
Hey @joshua-martin thanks for the updates! |
Thanks! |
Hey 👋
I've just found your plugin and set it up and it's exactly what I've been looking for! However, I'm running into issues with syncing between environments, using the Craft Project Config file.
Currently I have a local dev environment, a staging environment, and a production environment. These are synced using the Craft Project Config file.
The issue I'm having is:
a) I cannot add localhost to the App OAuth redirects, as it doesn't allow any non-HTTPS URI's
b) If I authorise Craftagram on Staging or Production, it all works fine, but when I then sync again, the long access token gets removed
c) If I were to set up a cron job to renew the access token on production, as outlined in the docs, this would presumably cause the project config on production to be different from other environments, and would also be overwritten the next time Craft was synced.
I was wondering if this is something which has been considered and if there's a work-around for, as unfortunately if it's not compatible it will mean I'm not able to use the Plugin. It's always such a pain working with the Instagram API, why do they make it so hard! 😂
The text was updated successfully, but these errors were encountered: