How to implement 3-legged OAuth in Apigee Edge.

Not applicable

I'm done with OAuth v2.0 using client credentials. Now, I'm trying to implement 3-legged OAuth in Apigee Edge.

I followed the github project but I'm unable to deploy the project in Edge. I'm getting the following error:

{"message":"Not Found", "detail":"The requested resource was not found."}

Can anyone help me how exactly we can do OAuth.

Solved Solved
0 10 3,571
1 ACCEPTED SOLUTION

Hi Radhika,

Please confirm if you are trying to run this sample: https://github.com/apigee/api-platform-samples/tree/master/sample-proxies/oauth-advanced

I recently set up and ran this sample successfully. I'm confident we can get it up and running for you. Could you send some more details -- which one of the four proxies are you not able to deploy?

By the way, this example is a complete, end to end implementation of OAuth 2 on Apigee.

View solution in original post

10 REPLIES 10

Hi Radhika,

Please confirm if you are trying to run this sample: https://github.com/apigee/api-platform-samples/tree/master/sample-proxies/oauth-advanced

I recently set up and ran this sample successfully. I'm confident we can get it up and running for you. Could you send some more details -- which one of the four proxies are you not able to deploy?

By the way, this example is a complete, end to end implementation of OAuth 2 on Apigee.

Hi I have deployed the sample as specified here but when i used yo oauth-auth-code-grant-sample it showed

'.' is not recognized as an internal or external command, operable program or batch file. The system cannot find the path specified.

in the screen. When I tried clicking the button at http://myorg-myenv.apigee.net/web I did not get any response, so when I went through the proxy I saw client Id has no appropriate value so I replaced with my product key then I accessed it, then it went to the login page. Now when I try to login it says authentication failed. Can anyone help me to get through this.

If anyone did this 3 legged oauth successfully please guide me. I am looking forward. Thanks in advance.

@sathyajayavel , It should work. I have tried recently. Looks like its more of node packages installation & path issues. Looks like yo command is not working for you.

I uninstalled yo and again installed still the problem exists. Can you suggest any other possible solution please.

This particular error seems isolated to Windows. I ran through the same sample on a Mac and it works fine. Running on a Windows 10 machine produced the same result as you see @sathyajayavel. Someone would need to look through the scripts to understand more why it's not working on Windows.

If you have no other machine, perhaps you could install a Linux VM on Oracle VirtualBox (or some other VM) to run through your tests and sample.

Hi Will, I just this and trying to run this code. Do I need to use any IDE to run this or can you please give your thoughts ?

Hi Radhika,

You could follow the following tutortial

http://apigee.com/docs/api-services/content/oauth-v2-policy-authorization-code-grant-type

Do you know at which stage you are getting the error, you aren't able to deploy the sample proxy?

Former Community Member
Not applicable

Have you been able to deploy any sample apiproxy from github? If not there could be some issues with your env settings. Also are you getting this error when deploying it to your org or when you are trying to access the proxy URL?

Not applicable

the official sample is very useful for you, I tried, and it worked well.

https://github.com/apigee/api-platform-samples/tree/master/sample-proxies/oauth-advanced

Hi Experts, I am trying to implement this sample and I am able to implement till step 3 properly. After I login with my credentials, It doesnt redirect me to proper page and it gives me following error in the browser "error outside req:Error: connect ECONNREFUSED".

It seems to be some connection issue but I dont know what is causing this. Can anyone help me out.

Thanks a ton in advance.