1. George Mikhailovsky
  2. PowerBuilder
  3. Monday, 30 September 2024 21:26 PM UTC

A few years ago, Bruce Armstrong kindly provided me with PBL to implement two-factor authentication. I implemented it then in my application, and it worked for several years without any problems. What's more, it still works for existing users who had already connected their IPhones to Google Authenticator using a QR code that they scanned when they first logged in.

However, today a new user was unable to do so because the QR Code Picture control was not populated with the QR code. I analyzed why this happened and found that URL returned by the GenerateProvisioningImage() function of the NVO u_google_authenticator (i.e., https://chart.apis.google.com/chart?cht=qr&chs=400x400&chl=otpauth%3A%2F%2Ftotp%2FSEPTA%3Agm%3Fsecret%3DMYYDSRKSGM2XGOLVKI2FUUC2LBUDCZCB) gives 404 error with message "The requested URL/chart was not found on this server. That's all we know." The second returned parameter of GenerateProvisioningImage() function "response" is empty string.

The last new user registered about 2 months ago and had no problems.

Do you know if Google has changed anything on their side? And how can I get my two-factor authentication working properly again?

Thank you,

George

 

References
  1. https://chart.apis.google.com/chart?cht=qr&chs=400x400&chl=otpauth%3A%2F%2Ftotp%2FSEPTA%3Agm%3Fsecret%3DMYYDSRKSGM2XGOLVKI2FUUC2LBUDCZCB
Accepted Answer
Mark Goldsmith Accepted Answer Pending Moderation
  1. Tuesday, 1 October 2024 18:13 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi George...further to Bruce's website suggestions, you may also wish to try https://quickchart.io/ as I understand that, for the most part, it accepts the parameters that Google Charts' API used.

To do so you simply need to replace chart.apis.google.com with quickchart.io in the URL and it should work.

This may work for you in a pinch if you need something right away, but I would agree with Bruce that not relying on a website for this service and incorporate your own QR Code generator is the way to go.

HTH...regards,

Mark

Comment
  1. George Mikhailovsky
  2. Tuesday, 1 October 2024 21:26 PM UTC
Dear Mark,

I was eager to test your solution, and I have already done so. It works great and has solved my problem for now.

Thank you again!

George



  1. Helpful
  1. Mark Goldsmith
  2. Tuesday, 1 October 2024 21:49 PM UTC
You're most welcome George, glad to hear that worked for you and thanks for the update!
  1. Helpful
There are no comments made yet.
George Mikhailovsky Accepted Answer Pending Moderation
  1. Tuesday, 1 October 2024 20:01 PM UTC
  2. PowerBuilder
  3. # 1

Thank you, a lot, Mark!

Your suggestion is probably the best one as a quick solution. I will try it tomorrow.

Yours,

George

 

Comment
There are no comments made yet.
George Mikhailovsky Accepted Answer Pending Moderation
  1. Tuesday, 1 October 2024 15:12 PM UTC
  2. PowerBuilder
  3. # 2

Thank you very much, Bruce! I will try your .NET assembly. Best regards, George

Comment
There are no comments made yet.
Bruce Armstrong Accepted Answer Pending Moderation
  1. Tuesday, 1 October 2024 14:51 PM UTC
  2. PowerBuilder
  3. # 3

Yes, Google announced plans to do away with that charting services some time ago.  If you look on CodeXchange I've also got a sample for using a .Net assembly to generate a QR code.  A combination of the two would work.

There are also other web sites that offer QR code generation on the fly, such as https://goqr.me/api/ and https://www.qr-code-generator.com/qr-code-api/ (the latter one I believe requires a subscription).  I came up with the .Net assembly approach because I no longer wanted to rely on a web service that might suddenly disappear.  But if you're happy using a web service simply switching out the one being used should be simple.

 

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.