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
GA integration on Dashboard used deprecated auth methods, must use oauth2.0 now #3491
Comments
Sounds like a lot of work trying to smush a PSR package into a traditional library setting. Rewriting probably won't be fun. What about just writing the bare essentials in cURL to get the path in? It doesn't do a whole lot and could probably put into a single patching class. Minimal overhead and straight to the point is my thought on this particular 2.2 problem. |
@mamarmite - Thanks for posting! This has been a problem all thru Pyro2.2 I hope we can get a resolution to this as Pyro2.2 will be around for a while..... |
@RyanThompson Thanks for the tip. - I did find that after I posted - but its all greek to me as a "non-dev" as Marco says.... Not sure what version Marco is referring to - assumed it was for 3.0. Sorry I cant be of any help. Maybe we can get other more capable devs to participate with Marco. Anyways, its been like this for yonks - I mentioned it because I am going thru all the niggles I have with 2.2.5, so it can wait til 3.0 is further down the track.... |
Don't worry @ikoniqoz, it's not THAT hard. Just follow the steps outlined in the OAuth2 docs: https://developers.google.com/identity/protocols/OAuth2ServiceAccount (Creating a service account)
This takes 15 minutes at most. |
@marcogrueter OK - Thanks for the tip. That I can try. |
I tried it on localhost with a fresh 2.2/develop branch and it work! (apache 2, php 5.6 windows) |
Firstly, much kudos to @marcogrueter for getting this issue addressed. Thanks Marco.
So far so good. The thing I am not clear on is this Is this key good for just one site, or do I need a new key for each client site ? And what about the Private Key's password "notasecret" ? Now that I have the key and added it to the system/cms/config folder, I see that the path is shown as an editable field (Google Analytic Password field) in the Integration tab of the Site's Settings page. I am wondering why this field is editable .. Perhaps it should be Read Only input type and the label changed to read "Google API Key Path" ? |
I've merged this in. |
Might need tweaking but at least it is moving! |
The library used in pyrocms 2.2.5 use a deprecated API (https://developers.google.com/identity/protocols/AuthForInstalledApps).
We should use oauth 2.0.
thephpleague oauth 2.0 lib seem perfect to replace the swis.nl one.
I need feedback for a fix:
My first dev plan is to:
Make the thephpleague oauth2.0 into a pyrocms library
Call the appropriate calls, indeed, on load of the dash board and use the config.
We may need to add a field to the config like API Key (or morph a field into that info) (didn't dig yet in the perequist of Google).
Thanks in advance for fix feedback.
The text was updated successfully, but these errors were encountered: