kavina-systems / MTD

HMRC MTD VAT bridging / soft landing software
3 stars 0 forks source link

OAuth login flow is broken #1

Open lukepuplett opened 5 years ago

lukepuplett commented 5 years ago

This error appears in the status bar after completing HMRC's OAuth flow in the browser control.

Step 2Exchange Authorisation Code For Access Token Failed

I'd recommend posting the code and allowing the community of software engineers just work on this app, there'll be 1000s of consultant developers needing a tool like this.

lukepuplett commented 5 years ago
03/03/2019 11:22:18 URI: https://api.service.hmrc.gov.uk/organisations/vat/(my_VAT_number_redacted)/payments?from=2018-12-03&to=2019-03-03 Execution time: 141ms

Cache-Control=no-cache,no-store,max-age=0
Connection=keep-alive
Date=Sun, 03 Mar 2019 11:22:10 GMT
Content-Length=96
Content-Type=application/json
Vary=Accept
X-Content-Type-Options=nosniff
Strict-Transport-Security=max-age=31536000;
{
  "code":"CLIENT_OR_AGENT_NOT_AUTHORISED",
  "message":"The client and/or agent is not authorised."
}

Forbidden 403
Step3 failed
Operation Aborted
https://www.tax.service.gov.uk/oauth/start?auth_id=(my_auth_code_redacted)

03/03/2019 11:22:25 Bad Request
{"error":"invalid_request","error_description":"code is invalid"}

Cache-Control=no-cache,no-store,max-age=0
Connection=close
Date=Sun, 03 Mar 2019 11:22:17 GMT
Content-Length=65
Content-Type=application/json
X-Frame-Options=DENY
X-XSS-Protection=1; mode=block
X-Content-Type-Options=nosniff
Content-Security-Policy=default-src 'self' 'unsafe-inline' localhost:9032 www.google-analytics.com data: www.googletagmanager.com fonts.googleapis.com tagmanager.google.com ssl.gstatic.com www.gstatic.com fonts.gstatic.com
X-Permitted-Cross-Domain-Policies=master-only
Strict-Transport-Security=max-age=31536000;

03/03/2019 11:22:25 URI: https://api.service.hmrc.gov.uk/oauth/token Execution time: 93ms

Cache-Control=no-cache,no-store,max-age=0
Connection=close
Date=Sun, 03 Mar 2019 11:22:17 GMT
Content-Length=65
Content-Type=application/json
X-Frame-Options=DENY
X-XSS-Protection=1; mode=block
X-Content-Type-Options=nosniff
Content-Security-Policy=default-src 'self' 'unsafe-inline' localhost:9032 www.google-analytics.com data: www.googletagmanager.com fonts.googleapis.com tagmanager.google.com ssl.gstatic.com www.gstatic.com fonts.gstatic.com
X-Permitted-Cross-Domain-Policies=master-only
Strict-Transport-Security=max-age=31536000;
{
  "error":"invalid_request",
  "error_description":"code is invalid"
}

Step2 failed
Operation Aborted
lukepuplett commented 5 years ago

Potentially it's because I haven't officially signed up for MTD with HMRC. Strange, really as I'd expect them to notify me during HMRC's OAuth browser experience but who knows.

lukepuplett commented 5 years ago

There is not enough time for us to set you up with Making Tax Digital for VAT before your next direct debit payment is due.

lol, okay it might be a little longer until I get the bottom of this.

kavina-systems commented 5 years ago

Hi, I tried it this morning and get the same error. I assumed it was because I only registered for MTD on the 1st March. The application was approved on the 1st March, maybe there is a delay with the HMRC. I will contact them tomorrow

kavina-systems commented 5 years ago

You will need to register with MTD before you can use the software. I was getting the "CLIENT_OR_AGENT_NOT_AUTHORISED" error after registering MTD VAT however this was due to my HMRC accounts all being rolled into one and I was using the wrong logon

lukepuplett commented 5 years ago

Hi Kevin, I wondered why you'd opened this ticket back up? Is it working?

kavina-systems commented 5 years ago

Hi,

Yes, just make it visible for anyone else

From: Luke Puplett [mailto:notifications@github.com] Sent: 14 April 2019 13:10 To: kavina-systems/MTD MTD@noreply.github.com Cc: Kevin Grey kevin@kavina-systems.com; State change state_change@noreply.github.com Subject: Re: [kavina-systems/MTD] OAuth login flow is broken (#1)

Hi Kevin, I wondered why you'd opened this ticket back up? Is it working?

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/kavina-systems/MTD/issues/1#issuecomment-482960580 , or mute the thread https://github.com/notifications/unsubscribe-auth/AsdkmtnACEy9qFBgWKVlwPXU5GxT0GfHks5vgxqVgaJpZM4ba75Z . https://github.com/notifications/beacon/AsdkmoUVO-FyNUlxS9N4is4PHhqZNkttks5vgxqVgaJpZM4ba75Z.gif