0

I have a Windows Store App that references a package that performs OAuth authorization to make working with a particular REST API easier. The problem is, they don't give you access to the access token generated by the session, or a way to provide the login details to the component via a method call or properties either. You call their component and it does the rest. The component puts up a simple form with with the login elements and the rest of the details are maintained internal to the component.

I'm guessing that through reflection or some other "meta" technique I should be able to get access to the login form elements (user name, password, etc.)? If I can do that during testing, then I can auto-enter the login details when I detect the presence of the component's login form from an async loop running in the background. As it is right now, every time I modify and run the program I have to laboriously enter the login details and a couple other fields of information.

Is there a way to get access to the referenced component's form elements so I can push text into them at run-time?

Robert Oschler
  • 14,153
  • 18
  • 94
  • 227

1 Answers1

1

AFAIK that is not possible, if the dev has access to the TextBox it would allow for the dev to steal the user's login info.

I know it's a bit inconvenient to have to login every time, but why aren't you storing the OAuth creds so the user stays logged in? The app will maintain LocalFolder and RomaingFolder info across deployments from Visual Studio.

Check out this sample (updated for Windows 8.1 in April 2014). You'll see several uses of the broker, as well as how to keep someone logged in and let the user manage this via the Settings Charm

Lance McCarthy
  • 1,884
  • 1
  • 20
  • 40
  • How do I get access to the OAuth creds if the component does not give me a way to get and therefore store the OAuth access token? – Robert Oschler Aug 12 '14 at 13:11