AnsweredAssumed Answered

oauth2 problems - redirect uri issue

Question asked by jaarons47 on Sep 19, 2014
Latest reply on Sep 23, 2014 by jaarons47
Branched to a new discussion

OK I am following the oauth2sample example for Android. 


I have setup the app and it has a Client ID.  I also setup the app with the Redirect URI for which I put in "oauthdemo://auth". In Strings.xml I have the following....


<string name="portal_url"></string>

  <string name="client_id">RtVrbexXFDewENQo</string>

    <string name="app_name">OAuth2Sample</string>

    <string name="login_type_dlg_message">Log in with saved credentials?</string>

    <string name="yes">Yes</string>

    <string name="no">No</string>

    <string name="enter_portal_url">Enter Portal URL</string>

    <string name="OAuth2_Sample">OAuth2 Sample</string>

  <string name="continue_with_saved_credentials">Continue with saved Credentials?</string>

  <string name="quit_app">Quit App?</string>


In the OAuth2 java class


OAuthView oAuthView = new OAuthView(context, getResources().getString(R.string.portal_url), getResources()

        .getString(R.string.client_id), new CallbackListener<UserCredentials>() {


When I run the sample I always get Error Invalid redirect_uri Error 400.  Where in the oAuthView example am I supposed to input the redirect uri?  I see no place for it in the code???? When I go into a web browser on the device it does take me to the correct location when I input the redirect uri and client id as follows...…


What gives??  How do I input the redirect uri into the code above to make it work?