1

I am trying to get authentication code and access token but not able to get it as it returns code either in html header or in query string but both method is not supported by Nokia oauth-20.

urn:ietf:wg:oauth:2.0:oob This value signals to the Google Authorization Server that the authorization code should be returned in the title bar of the browser.

other one: This value signals to the Google Authorization Server that the authorization code should be returned as a query string parameter to the web server on the client.

Nokia oauth-20 Limitations:

Reference:

http://developer.nokia.com/resources/library/Java/developers-guides/data-handling/oauth-20/creating-an-invocation.html

Redirect must be to an internet site The mechanism cannot support authentication scenarios where the redirect URL is not an internet site accessible by the proxy server, such as where it is “localhost”.

Token accessibility The mechanism cannot support authentication scenarios where the token is not returned as part of the redirect URL (for example, if it is encoded in other metadata in the response such as page title).

My question is that there is another option to get access token via web application calling the below url and it works fine if I try it in browser but if I call the link from my mobile using oauth 2 the access token got generated but calling any othe api gives me error 403 insufficient permission.

https://accounts.google.com/o/oauth2/auth?scope=https://www.googleapis.com/auth/drive&redirect_uri=https://login.live.com/oauth20_desktop.srf&response_type=token&client_id=598197514064-0kvbbg9uiurki0oht8c9hga2jqon5c6e.apps.googleusercontent.com

Thanks Susobhan Panja

1 Answers1

0

According to the Google Oauth documentation, the URL request format is as follows:

https://accounts.google.com/o/oauth2/auth?
scope=email%20profile&
redirect_uri=urn:ietf:wg:oauth:2.0:oob&
response_type=code&
client_id=812741506391-h38jh0j4fv0ce1krdkiq0hfvt6n5amrf.apps.googleusercontent.com

You need to set your scope, redirect_uri, and response_type arguments as directed in the docs.

Jojo
  • 1
  • 3