I'm using HWIOAuthBundle (with google configuration) for authentication in one of my project.
It works very well most of the time. But at some point when I surf on the application, I get an error about the google_id. It doesn't appear on a specific page but all sudenly (after a period of inactivity). Basically, the google_id that my user provider get is suddenly null. As I'm not able to reproduce the error and it's very difficult to debug.
It seems to come from either the HWIOAuth bundle for which I'm may be using wrong configuration settings or from Symfony 2 session. But I tried changing the session life time and nothing work (as I said I'm not beeing able to reproduce the error on demand. It appears out of the blue...).
Do you have any idea how to solve this issue?
Regards
I've encountered the same issue. The access token retrieved from Google is no longer valid and needs to be refreshed. Unfortunately I haven't found out a good way to do it.
Related
I work for a company that has a store built on Magento and hosted in AWS, the version we are currently on is 2.3.4. For a few weeks now the website has been producing an error in the console which comes into effect when a customer wants to check out the items in their cart. They can add the item, proceed to check out, enter their shipping information, and when they confirm their shipping information the following error appears when they are on the credit card information page:
Uncaught ReferenceError: Unable to process binding "if: function({
return(addressOptions.length > 1) }"
Message: addressOptions is not defined
at if (eval at createBindingsStringEvaluator (knockout.min.js:280), <anonymous>:3:55)
at ko.computed.disposeWhenNodeIsRemoved (knockout.min.js:376)
at Function.evaluateImmediate_CallReadThenEndDependencyDetection (knockout.min.js:208)
at Function.evaluateImmediate_CallReadWithDependencyDetection (knockout.min.js:204)
at Function.evaluateImmediate (knockout.min.js:202)
at Object.ko.computed.ko.dependentObservable (knockout.min.js:193)
at init (knockout.min.js:376)
at knockout.min.js:312
at Object.ignore (knockout.min.js:140)
at knockout.min.js:312
I've been given the task of remedying the problem. It should be said that the website was made by a freelance developer with whom the company no longer has ties. So it is fair to say that I have no idea what to do. My thoughts are to create a staging site, implement solutions from other people who faced the same issue, fix the problem, push changes into production and be the Hero the office needs, but doesn't deserve. yay.
This brings me to my second batch of problems. I have SSHd into the server and I can not locate the application directory to copy so that I may create a staging site. Heck, I don't even know If there is an application dir. The website is hosted on AWS, I have looked online for tutorials and documentation about Magento file structure but have returned defeated.
What do I want from this forum? Help. lots of help. I would like help with:
Why is this error being triggered?
Where can I locate the source code for the Magento site and how can I copy it to my local machine. I've found that SCP seems to be the most efficient method.
After I copy where do I find the Models, Views, and Controller folders? I have zero experience with PHP but I am not intimidated to learn. (I have some experience with Angular and Django frameworks.)
After I make the changes how do I push the changes to the live site? Can I use git? How?
I request detail. Lots and lots of detail with links and examples would be great.
Thank you! And I look forward to all the help
I have set up a simple Wordpress site with an order form but I'm struggling to get the site to recognise Sage Pay.
I've been following the initial instructions in the PHP integration kit - http://www.sagepay.co.uk/support/find-an-integration-document/direct-integration-documents:
Create a database and add the necessary tables.
Edit the /lib/config.php and the /demo/config.php to include my Sagepay Account and database details
In the test server for Sage Pay I also added the IP address of my site as an exception.
Every time I run the https://mywebsite.com/demo it returns the error:
Ooops!!!
An unexpected error seems to have occurred.
Try to refresh the page or you can contact us if the problem persist.
This is pretty early on in the but I seem to be doing something wrong. Is there something else that needs edited as the instructions are frustratingly vague.
Would I be better just using a Sagepay Direct plug in with Wordpress e-commerce solutions?
Thanks.
I am also a currently frustrated Sagepay learner. To asnswer you question, I had this problem too. My problem was that i had the database details incorrect. I had my local host details on my test environment, and i had not changed the details correctly in demo/config.php before ftp the file to my webserver. Once i did this, i got over the oops screen. The next problem was that i got a blank screen when running index.php from demo. I was told by sagepay that apache needs restarting as a service everytime somethingortheother happens. So on my local environment i restarted all services in wamp and it worked. I can now see the demo (not that i know what to do now as there are no instructions and the php is hidden in a complex class structure with the html content in some tpl files which i have never seen before - of course there are no instructions in the integration kit at all). Anyway back to the answer. So locally i can run the demo, but i still have white screen on my webserver, becuase i can't restart the apache service there, so that is the next problem. I will keep trying and add anything useful later.
I also had this problem, I had not given the database user account the necessary permissions to access the database.
Problem:
ALL users cannot login to live frontend web application. When using known 'valid' login credentials, no validation 'invalid' error feedback is given, it simply returns the user to the login page and denies access. When using known 'invalid' credentials, the app does provide the correct 'invalid' validation error feedback.
Background:
One day users were able to login without incident, the next day all users (including super-admin users) were unable to login to the live website. Before incident, website had been up and running for well over 24 months with no login issues.
Also, passwords are hashed using sha1 and salted in the database. I have a lot of members, and asking members to re-register is to be avoided at all costs (assuming I can even get a super admin to be able to login).
Setup:
Symfony 1.4, PHP 5.4, MySQL, Plugins used: Doctrine Guard, ForkedDoctrineApply
Troubleshooting:
Incident appeared to have happened around about the time a scheduled upgrade on the host server from PHP 5.X to PHP 5.4. But I can't be certain. After the automatic upgrade took place, and the problem arose, the host was reverted back to the original PHP version and the login issue remained. Can I rule out a problem with the host PHP version??
Using control panel and symfony commands [symfony guard:create-user], I created a new user, which I verified as successful in the database. I then tried logging in with the newly-made credentials and the problem persists.
Used the registration form on the frontend and attempted to register a new user that way. No dice. User is not created.
Placed the following code on the template to verify authentication:
<?php if (($sf_user->isAuthenticated ())): ?>
Authenticated
<?php endif; ?>
Under no circumstance was I able to get "Authenticated" to print
Thoughts:
Since I am unable to get a validation error using know valid credentials (it just redirect to the login component without throwing an invalid error), I am led to believe that the credentials are indeed good and valid... I am therefore led to believe that something happened to the authentication process - or I got hacked somehow.
I'm stumped. Any help would be greatly appreciated.
I'm relatively new to programming and am having trouble with using OAuth with my app hosted on Amazon Beanstalk.
What I wish my app to do is to connect to the Constant Contact API, using the base code shown here
https://github.com/shannon7wallace/OAuth-2-PHP-Example
If I execute this code locally, everything works fine. I am able to login with my constant contact credentials and pull data. I was sure to setup my redirect uri in my constant contact developer key correctly, and everything works perfectly locally.
When I deployed it to AWS however, I would get a blank page when trying to navigate to index.php. I double checked my container settings and the zip package I uploaded to ensure I was pointing to the correct directories, and made sure my AWS healthcheck pointed to a publicly accessible URL (AWS shows app as being healthy), but the page is blank.
If I replace my index.php with simply HTML or even phpinfo(), it works. I suspect it gets hung up at the authentication check but even if I hard code my account credentials in and remove the login logic, I still get a blank page. Even the html outside my php script tags does not display, regardless if I include things like or other head tags.
Googling for OAuth + Beanstalk produces very little, and the constantcontact API documentation, at least to my inexperienced eyes, is pretty sparse, but the closest thing I could find addressing my problem is this
https://forums.aws.amazon.com/thread.jspa?messageID=277339񃭛
The scenario in the above thread seems to address a problem much more specific than mine, and I am unsure on how to apply the solution to my particular case.
Is there something obvious I am missing? I can't believe AWS would be unsuited for apps using OAuth considering the vast array of projects that are hosted on it.
I appreciate any help anyone can offer.
The Beanstalk container options for PHP have an option to control whether errors should be displayed; switching it to "On" should write a fatal error on your page.
As it turns out, even after changing the setting, the pages would still be blank. I'm not sure if the feature is broken, but it definitely guards you from accidentally leaving it on :)
You'd have to log into your instance (assuming your site isn't loaded yet and it's really just one) and edit your code to insert the customary debug statements as high up as possible:
error_reporting(-1);
ini_set('display_errors', 'On');
Barring any parse errors in your page, it will show the offending error.
I have an Auth component (based on Zend_Auth) which I am using in many projects on different servers and different environments. It has always worked... until now:
When I try to log in to a new project (using the same Auth component) with Google Chrome (12.0.742.122), I'm being logged out right after logging in. The problem doesn't occur with FF or IE.
Does anyone have a clue why this could be?
This is not a ZF issue. As strange as it may sound, the issue is solved by adding a favicon to your site. Chrome is making a request for the favicon and invalidating the session when it gets a 404. I read one post that suggested that a special 404 configuration might help.
Might be this bug: http://framework.zend.com/issues/browse/ZF-11502 - there is a fix suggested in the comments.
It is a weird story. If you google the problem, you find that it sporadically turns up here and there but never systematically. There is a bug report for Zend Framework, there are issues at the Google Forums, there are similar reports in the tracking systems of Drupal and Wordpress. But somehow there are no clear answers.
In my case, the problem just went away by itself in the course of some other refactorings.
Just a hint ... I had the same problem. After debugging I found out there is a clash with cookie name on the main domain. It worked in FF and IE, Chrome however took a top domain cookie for ajax request and the lower one on regular request.