Monday, 20 March 2023
  6 Replies
  878 Visits
  Subscribe
Using your OAuth Server and client components.

The server is fine and working with postman, both locally and over SSL via NAT

The client works fine locally, but over the network (Loads website for credentials etc) fails to pass the body back to the server correctly so results in a 404, though the log shows it should have sent everything correctly.

Is the client component ready for production? if so am I missing a setting somewhere?
1 year ago
·
#1458
Hello,

Yes, the client is ready for production. Most probably is misconfigured.
If server/client works locally but not over the network, usually is a problem of ports, are the public ports configured? maybe you are behind a NAT?
Please provide more details or a sample so I can help with this issue.

Kind Regards,
Sergio
1 year ago
·
#1459
That's great that it's production ready.

Everything works perfectly with Postman, so it does not look like a server or NAT configuration issue.

When running the server in debug, I can see that the params are empty but looking at the log they sent. Trying your compiled sample has the same issue with the following response after completing successful authentication in the browser.


After Authorize Code: code=4e4e0c4f2d8b48f184f05f0771bdf8e4
state=49FE0FBDA519464DB0F29AE321C1ED56

Error Access Token: invalid_request
1 year ago
·
#1460
invalid_request is raised when an internal error happens. If you can provide a sample I'll try here.

Kind Regards,
Sergio
1 year ago
·
#1461
Hi Sergio,

I have downloaded your current compiled demo, and it has the same issue, to recreate the problem please follow these instructions.

1) Download your Compiled demo's and extract 02.OAuth2_Authentucation from the 20.HTTP_Protocol folder.
2) Run the OAuth2_server.exe and change the port to 4500 (or any other port)
3) On this machines open up the port from step 2 in the firewall (We used 4500)
4) Start the server.

-- Local test --

1.a) run OAuth2_client.exe locally, change the configuration option to localtest, add the port :4500 (or the port you chose in step 2) for Auth and Token URL
2.a) Click new access token
3.a) The website will now load but you will need to accept the certificate, click allow, then enter the username: user and password: secret click sign in.
4.a) You will now have a success message in your local application with the expected results.

-- Network test --

1.b) run OAuth2_client.exe locally, change the configuration option to localtest, change the 127.0.0.1 to the ip of the machine running the server and add the port :4500 (or the port you chose in step 2) for Auth and Token URL
2.a) Click new access token
3.a) The website will now load but you will need to accept the certificate, click allow, then enter the username: user and password: secret click sign in
4.a) You will now have failed with the error Error Access Token: invalid_request

--- notes ---

Please ensure you can see the website, if you cannot then you will have a firewall issue which should be opened on the server as shown above.

I know its a bit overkill with detail here, but I wanted to make it easy for anyone else in the future to follow if needed :-)
1 year ago
·
#1462
Hi,

Ok, thanks for the explanation, I willt test it and let you know the result of my tests.

Kind Regards,
Sergio
1 year ago
·
#1463
Hello,

There was a bug processing the Token request, I've fixed it, you can download the compiled OAuth2 demo from the following link:

https://www.esegece.com/download/protocols/sgcOAuth2.zip

Kind Regards,
Sergio
  • Page :
  • 1
There are no replies made for this post yet.
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below.
Supported: gif,jpg,png,jpeg,zip,rar,pdf
· Insert · Remove
  Upload Files (Maximum 10MB)