OAuth Providers

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
bworrey
Posts: 15
Joined: Tue Aug 23, 2022 5:20 pm

OAuth Providers

Post by bworrey »

I am able to validate and it passes but when it gets back to the providers screen I have

Error: Access token missing in the JSON response.


Then when I go back into email
test the imap I get

Error: Unable to retrieve an access token. Please confirm your OAuth Provider settings and re-save them to acquire a new token.


We are using O365
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: OAuth Providers

Post by Klemen »

If you get an "Error: Access token missing in the JSON response" message then the provider was not verified properly, even if the OAuth Providers page says so (something for us to fix).

Does the verification work without errors, if you go to Tools > Oath Providers, edit the provider, select "Do not validate server certificates", and click save?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
bworrey
Posts: 15
Joined: Tue Aug 23, 2022 5:20 pm

Re: OAuth Providers

Post by bworrey »

It says verified but i get the error about JSON response

Image
bworrey
Posts: 15
Joined: Tue Aug 23, 2022 5:20 pm

Re: OAuth Providers

Post by bworrey »

here is the photo

https://ibb.co/5LtWgf7
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: OAuth Providers

Post by Klemen »

Can you try this please:

1. go to Admin > Settings > Help desk and under "Features" turn "Debug mode" ON then save changes
2. download this file: https://hesk.com/extras/hesk3/hesk340_oauth_debug.zip
3. upload the oauth_functions.inc.php file to your "inc" folder (overwrite original file)
4. go to Admin > Tools > OAuth providers, edit your provider and click "Save"
5. copy/paste any errors or messages you get and send them to me (you can in a private message if it contains sensitive information)
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
bworrey
Posts: 15
Joined: Tue Aug 23, 2022 5:20 pm

Re: OAuth Providers

Post by bworrey »

I get the same error

Error: Access token missing in the JSON response.
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: OAuth Providers

Post by Klemen »

There should be a textbox below the error message with some data when using the modified file? Did you copy it over the original one (make sure to unzip it first)?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
bworrey
Posts: 15
Joined: Tue Aug 23, 2022 5:20 pm

Re: OAuth Providers

Post by bworrey »

I made sure to unzip copied the file into the INC folder

This is the PHP
(removed by admin)


debug is on and this is the error I get


https://ibb.co/QYDywPs
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: OAuth Providers

Post by Klemen »

Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
bworrey
Posts: 15
Joined: Tue Aug 23, 2022 5:20 pm

Re: OAuth Providers

Post by bworrey »

no worries thank you

this is what it returned

Debug info:

R: false
J: NULL
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: OAuth Providers

Post by Klemen »

Ok, so it looks like a cURL connection error.

Please download the same file again (I made some changes to it) and try again, let's see if cURL reports any errors.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
bworrey
Posts: 15
Joined: Tue Aug 23, 2022 5:20 pm

Re: OAuth Providers

Post by bworrey »

this is the error i get now

STATUS: 0
Error: SSL certificate problem: unable to get local issuer certificate
bworrey
Posts: 15
Joined: Tue Aug 23, 2022 5:20 pm

Re: OAuth Providers

Post by bworrey »

(REMOVED)

this is the address it populated
Klemen
Site Admin
Posts: 10142
Joined: Fri Feb 11, 2005 4:04 pm

Re: OAuth Providers

Post by Klemen »

That's a server-side SSL verification error. Here's the correct way to fix it:
https://stackoverflow.com/questions/246 ... ertificate

What you can also try as a workaround:
1. create a NEW Oauth provider (don't edit this one)
2. enter all the details
3. make 100% sure you select "Do not validate server certificates" before clicking "Save"
4. click Save and see if it worked?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
bworrey
Posts: 15
Joined: Tue Aug 23, 2022 5:20 pm

Re: OAuth Providers

Post by bworrey »

I have success
thank you
appreciate your time
Post Reply