Need to display the oauth_code in Json format.

During our Authorization flow using oauth policy. we need to display the oauth code into JSON format currently this is displayed into URL which means the code is appended to callBack URL.

But now rather than appending this, we need to display in JSON format on callback URL which is passed.

@Anil Sagar @Dino @Siddharth Barahalikar could you all have suggested some solution to this would be highly appreciated.

@Dino in below video you showed the Auth code into the browser, thats what exactly is the requirement of ours could you please suggest your input on this.

Solved Solved
0 5 207
1 ACCEPTED SOLUTION

Not applicable

The authorization code being returned as a query parameter attached to the callback is exactly according to the OAuth v2 specification.

It is highly recommended to follow the specs unless you really know what you are doing.

If this approach doesn't work for your use case, OAuth v2 authorization code grant isn't probably the most suitable authentication method. You may consider another authentication method or OAuth v2 grant.

View solution in original post

5 REPLIES 5

Not applicable

The authorization code being returned as a query parameter attached to the callback is exactly according to the OAuth v2 specification.

It is highly recommended to follow the specs unless you really know what you are doing.

If this approach doesn't work for your use case, OAuth v2 authorization code grant isn't probably the most suitable authentication method. You may consider another authentication method or OAuth v2 grant.

Hello @Ivan Novakov

You mean to say it's not possible to do send the code into JSON format right..?


I'm saying, that it doesn't make sense. Either you want to use OAuth2 and follow the specs or you can invent something else, but I highly recommend against this.

Thanks @Ivan Novakov
We would try something else. Ideally, the requirement is to generate the oAuth code into JSON response it doesn't take because on the fly we are calling multiple API that gives us the output into callback form and at last the API gives output, we are unable to extract this code into variable.


Hello @DinoChiesa-at-Google @Dino

I just came across your video, where I saw you had displayed the oAuth code in the browser.

Please have a look at below snap and link.
https://www.youtube.com/watch?v=GFLvpcocYfE&list=UU6nDuExOM6D0c_sXVnHzivg&index=7

6319-code.jpg

Could you please tell me how can we do this, since our requirement is exactly the same.

Your help is appreciated.